anchor

Darwin Information Typing Architecture (DITA) Version 1.3 Part 1: Base Edition

Document
Darwin Information Typing Architecture (DITA) Version 1.3 Part 1: Base Edition
Version
1.3
Author
OASIS DITA Technical Committee

The anchor element provides an integration point that another map can reference in order to insert its navigation into the referenced map's navigation tree. For those familiar with Eclipse help systems, this serves the same purpose as the anchor element in that system. It might not be supported for all output formats.

The mechanism by which map processors discover maps to be anchored is processor specific.

The anchor element is typically used to allow integration of run-time components. For build-time integration, you can use a topicref element to reference another map, or use the conref or conkeyref attribute on an element inside the map.

Content models

See appendix for information about this element in OASIS document type shells.

Inheritance

- map/anchor

Example

In this example, the map1.ditamap contains an anchor element with an id attribute set to "a1".
Figure. DITA map that contains an anchor
<map>
  <title>MyComponent tasks</title>
  <topicref navtitle="Start here" href="start.dita" toc="yes">
    <navref mapref="othermap2.ditamap"/>
    <navref mapref="othermap3.ditamap"/>
    <anchor id="a1"/>
  </topicref>
</map>
The id on an anchor element can be referenced by the anchorref attribute on another map's map element. For example, the map to be integrated at that spot could be defined as follows.
Figure. DITA map that references an anchor
<map anchorref="map1.ditamap#a1">
  <title>This map is pulled into the MyComponent task map</title>
  <!-- ... -->
</map>

Attributes

The following attributes are available on this element: Universal attribute group (with a narrowed definition of id, given below) and outputclass.

id (REQUIRED)
Provides an integration point that another map can reference in order to insert its navigation into the current navigation tree. The anchorref attribute on a map can be used to reference this attribute. See ID attribute for more details.