Documentation Center

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

Plugin configuration parameters:
ParameterRequiredDefault valueAllowed valuesDescription
KeepResolvedDTDSystemIdsNoYesYes / NoWhen 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, ISHModule and ISHLibrary for every language.
    • Loads and checks whether the file contains an ishdoctype processing instruction.
    • If a ishdoctype processing instruction is found, the DOCTYPE is restored from the processing instruction. If the parameter KeepResolvedDTDSystemIds is 'yes', the resolved SYSTEMID (found from the catalog.xml) is restored, otherwise the original SYSTEMID is restored.
    • Save the file again with the same file name.