Target creation

The following automatic link targets are created:

  • For each file read the target PATH is created, where PATH is the normalized path to the file.

  • For any element that inherits from topic with an id attribute the target PATH#TOPICID is created.

  • For any other elements with both class and id attributes the target PATH#TOPICID/ID is created.

Note that targets are created regardless of whether a mapping is found for an element, so you do not need to make mappings just to enable link targets.

Target positioning

For elements with a title, TopLeaf will generally place the link target immediately before the title. In order to have the target correctly positioned, anything that affects the position (such as starting a new page) should be done by the mapping for the element rather than the mapping for the title.

For example, see the Demonstrations/DITA/book stylesheet. The topic and topic/title mappings together provide styling for a topic title. The former takes care of starting a new page where appropriate by inserting a <NewTopic> custom marker.