IPublishPostProcessPlugin - IshRestoreDocTypePlugin
When the files are being exported during the publish, the DOCTYPE inside the XML content is replaced by a ishdoctype processing instruction for performance reasons. This plugin loads the XML content files and restores the DOCTYPE back to its original form.
Plugin Input
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| KeepResolvedDTDSystemIds | No | Yes | Yes / No | When set to Yes, the resolved SYSTEMID (found from the catalog.xml) is restored |
Input expected in the context.Items collection: None
Plugin Outcome
Changes made to the file system: The DOCTYPE is restored in all XML content files having a ishdoctype processing instruction.
Values set in the context as a result: None
Values set in the context.Items collection as a result: None.
plugin name="ISHRESTOREDOCTYPE" example
<plugin name="ISHRESTOREDOCTYPE" handler="IshRestoreDocType">
<description>This plugin will load all files of types ISHMasterDoc, ISHLibrary, ISHModule and see if they contain a ishdoctype processing instruction.
If they contains the ishdoctype processing instruction, the contents of the processing instruction is converted back into a DOCTYPE definition and the
file is saved again.
</description>
<initialize/>
</plugin>
Plugin flow
IshRestoreDocType does the following:
- For every content file of type
ISHMasterDoc,ISHModuleandISHLibraryfor every language.- Loads and checks whether the file contains an
ishdoctypeprocessing instruction. - If a
ishdoctypeprocessing instruction is found, theDOCTYPEis restored from the processing instruction. If the parameter KeepResolvedDTDSystemIds is 'yes', the resolvedSYSTEMID(found from thecatalog.xml) is restored, otherwise the originalSYSTEMIDis restored. - Save the file again with the same file name.
- Loads and checks whether the file contains an