Documentation Center

IPublishPostProcessPlugin - IshConvertMapAnchorRefs

This plugins opens the DITA Maps and searches for anchorref attributes or anchorref elements having an href attribute. When an anchorref is encountered, it's value is converted so it suits the Eclipse Help referencing format, allowing you to refer to content in another published Eclipse Help file which is visible in the Eclipse Viewer as well.

Plugin Input

Plugin configuration parameters: None

Input expected in the context.Items collection: None

Plugin Outcome

Changes made to the file system: The values of any found anchorref attribute or anchorref element href attribute are changed to a referencing format suited for Eclipse Help.

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="ISHCONVERTMAPANCHORREFS" handler="IshConvertMapAnchorRefs">
   <description>Converts the anchorrefs to a valid Eclipse Help format</description>
   <initialize/>
</plugindefinition>	  

Plugin flow

IshConvertMapAnchorRefs does the following:
  • Opens all DITA Maps and searches for the anchorref attribute or anchorref element href attribute
  • If an anchorref is found, it's value is converted to the following syntax:
    • Original value: "{ID}#{ANCHORID}" => converted value: "../{ID}/{ID}.xml#{ANCHORID}"
    • Original value: "{ID}" => converted value: "../{ID}/{ID}.xml"
    • Original value: "#{ANCHORID}" => converted value: "#{ANCHORID}"