topicref

The <topicref> element identifies a topic (such as a concept, task, or reference) or other resource. A <topicref> can contain other<topicref> elements, allowing you to express navigation or table-of-contents hierarchies, as well as implying relationships between the containing <topicref> and its children. You can set the collection-type of a container <topicref> to determine how its children are related to each other. You can also express relationships among <topicref>s using group and table structures (using <topicgroup> and <reltable>). Relationships end up expressed as links in the output (with each participant in a relationship having links to the other participants by default).

You can fine tune the output from your map by setting different attributes on topicrefs: for example, the linking attribute controls how its relationships to other topicrefs are expressed as links, and the toc attribute controls whether the topicref shows up in TOC or navigation output.

Example

In this example, there are six topicrefs. They are nested and have a hierarchical relationship. Bats.dita is the parent topic and the other topics are its children.
<map title="Bats">
 <topicref href="bats.dita" type="topic">
  <topicref href="batcaring.dita" type="task"></topicref>
  <topicref href="batfeeding.dita" type="task"></topicref>
  <topicref href="batsonar.dita" type="concept"></topicref>
  <topicref href="batguano.dita" type="reference"></topicref>
  <topicref href="bathistory.dita" type="reference"></topicref>
 </topicref>
</map>

Contains

Doctype Content model
map ( ( topicmeta) (optional) then ( topicref or topichead or topicgroup or navref or anchor or data or data-about) (any number) )
bookmap ( ( topicmeta) (optional) then ( topicref or topichead or topicgroup or navref or anchor or data or data-about) (any number) )

Contained by

Doctype Parents
bookmap map, topicref, relcell, frontmatter, backmatter, draftintro, preface, chapter, part, appendix, notices, glossarylist, topichead, topicgroup
map map, topicref, relcell, topichead, topicgroup

Inheritance:

- map/topicref

Attributes

Name Description Data Type Default Value Required?
navtitle Specifies the title of the topic as it will appear in navigation or tables of contents generated from the map. CDATA #IMPLIED No
href A pointer to the resource represented by the <topicref>. References to DITA content cannot be below the topic level: that is, you cannot reference individual elements inside a topic. References to content other than DITA topics should use the format attribute to identify the kind of resource being referenced. CDATA #IMPLIED No
query This attribute is deprecated. It may be removed in the future. CDATA #IMPLIED No
copy-to Use the copy-to attribute on the <topicref> element to provide a different file name for a particular instance of the topic in the map (for example, to separate out the different versions of the topic, rather than combining them on output). The links and navigation associated with that instance will point to a copy of the topic with the file name you specified.

Use the <linktext> and <shortdesc> in the <topicref>'s <topicmeta> to provide a unique name and short description for the new copy.

CDATA #IMPLIED No
%topicref-atts; (collection-type, type, scope, locktitle, format, linking, toc, print, search, chunk) A set of related attributes. See %topicref-atts; and %topicref-atts-no-toc;. parameter entity PE not applicable Not applicable
%univ-atts; (%select-atts;, %id-atts;, %localization-atts;) A set of related attributes, described at %univ-atts; parameter entity PE not applicable Not applicable
%global-atts; (xtrf, xtrc) A set of related attributes, described at %global-atts; parameter entity PE not applicable Not applicable
class, outputclass, keyref Common attributes described in Other common DITA attributes      

Return to main page.

OASIS DITA Version 1.1 Language Specification -- OASIS Standard, 1 August 2007
Copyright © OASIS Open 2005, 2007. All Rights Reserved.