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.
( (topicmeta) (optional) then (topicref or (topichead or topicgroup) or navref or anchor) (any number) )
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 |
id | This ID is the target for references by conref attributes, to allow build-time integration of maps. | ID | #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 |
keyref | Currently not implemented in DITA processors. Provides a key that a process can use to look up associated information. | NMTOKEN | #IMPLIED | No |
query | Lists query criteria, or uses metadata as query criteria. The query pulls in matching topics under the current element if the current element has a title or href; otherwise references to the matching topics replace the element at the current location. | CDATA | #IMPLIED | No |
conref | References an equivalent element in the same map or another map,
which will be copied into the current element's location when the conref is
resolved. The syntax uses the target's file name and element ID; it does not
require the map ID for scoping since there is only ever one map per target
file:Local target: conref="#elementID" In different file: conref="othermap.ditamap#elementID" |
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;. | parameter entity | PE not applicable | Not applicable |
%select-atts; (platform, product, audience, otherprops, importance, rev, status) | A set of related attributes, described at %select-atts; | parameter entity | PE not applicable | Not applicable |
translate | Indicates whether the content of the element should be translated or not. | yes | no | #IMPLIED | No |
xml:lang | Specifies the language of the element content. When no xml:lang value is supplied, the default value of English is assumed. For example, if there is a note element with the attribute xml:lang set to the value "es-es," then the label on the note, which is normally output as "Note" is now output in Spanish as "Nota." The allowed xml:lang values are based on ISO-3166 Country Codes and RFC 3066 Language Codes (see W3C: Language tagging in HTML and XML). | NMTOKEN | #IMPLIED | No |
%global-atts; (xtrf, xtrc) | A set of related attributes, described at %global-atts; | parameter entity | PE not applicable | Not applicable |
class | A common attribute described in Other common DITA attributes |
<map title="Bats" 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>
OASIS DITA Language Specification v1.0 -- 09 May 2005
Copyright (c) OASIS Open 2005. All Rights Reserved.