The <topicref> elements are the basic elements of a map. A <topicref> element can reference a DITA topic, a DITA map, or any non-DITA resource. A <topicref> element also can have a title, short description, and the same kind of prolog-level metadata that is available in topics.
The <topicref> elements can be nested to create a hierarchy, which can be used to define a table of contents (TOC) for print output, online navigation, and parent/child links. Hierarchies can be annotated using the @collection-type attribute to define a particular type of relationship, such as a set of choices, a sequence, or a family. These collection types can affect link generation, and they may be interpreted differently for different outputs.
Relationship tables are defined with the <reltable> element. Relationship tables can be used to define relationships between DITA topics or between DITA topics and non-DITA resources. In a relationship table, the columns define common attributes, metadata, or information type (for example, task or troubleshooting) for the resources referenced in that column. The rows define relationships between the resources referenced in different cells of the same row.
The <relrow>, <relcell>, <relheader>, and <relcolspec> elements are used to define the components of the relationship table. Relationships defined in the relationship table also can be further refined by using the @collection-type attribute.
The following example contains the markup for a simple relationship table:
<map> ... <reltable> <relheader> <relcolspec type="concept"/> <relcolspec type="task"/> <relcolspec type="reference"/> </relheader> <relrow> <relcell> <topicref href="A.dita"/> </relcell> <relcell> <topicref href="B.dita"/> </relcell> <relcell> <topicref href="C1.dita"/> <topicref href="C2.dita"/> </relcell> </relrow> </reltable> </map>
type="concept" | type="task" | type="reference" |
---|---|---|
A | B |
C1 |
When the output is generated, the topics contain the following linkage:
The following example illustrates how keys can be defined:
<map> <keydef keys="dita-tc" href="dita_technical_committee.dita"/> <keydef keys="dita-adoption" href="dita_adoption_technical_committee.dita"/> ... </map>
The map also could be tagged in either of the following ways:
<map> <topicref keys="dita-tc" href="dita_technical_committee.dita" processing-role="resource-only"/> <topicref keys="dita-adoption" href="dita_adoption_technical_committee.dita" processing-role="resource-only"/> ... </map>
<map> <topicref keys="dita-tc" href="dita_technical_committee.dita" toc="no" linking="no" search="no"/> <topicref keys="dita-adoption" href="dita_adoption_technical_committee.dita" toc="no" linking="no" search="no"/> ... </map>
The following code sample illustrates how a DITA map can reference another DITA map:
<map> <title>DITA work at OASIS</title> <topicref href="oasis-dita-technical-committees.dita> <topicref href="dita_technical_committee.dita"/> <topicref href="dita_adoption_technical_committee.dita/> </topicref> <mapref href"oasis-processes.ditamap"/> ... </map>
The map also could be tagged in the following way:
<map> <title>DITA work at OASIS</title> <topicref href="oasis-dita-technical-committees.dita> <topicref href="dita_technical_committee.dita"/> <topicref href="dita_adoption_technical_committee.dita/> </topicref> <topicref href"oasis-processes.ditamap" format="ditamap/> ... </map>
With either of the above examples, during processing, the map is resolved in the following way:
<map> <title>DITA work at OASIS</title> <topicref href="oasis-dita-technical-committees.dita> <topicref href="dita_technical_committee.dita"/> <topicref href="dita_adoption_technical_committee.dita/> </topicref> <-- Contents of the oasis-processes.ditamap file --> <topicref href"oasis-processes.dita> ... </topicref> ... </map>
<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>
<map anchorref="a1"> <title>This map is pulled into the MyComponent task map</title> ... </map>
Return to main page.
OASIS DITA Version 1.2 -- OASIS Standard, 1 December 2010
Copyright © OASIS Open 2005, 2010. All Rights Reserved.