The type attribute is most often used on linking elements to describe the target of a cross-reference. It is also used on the note element to describe the type of the current note, and on several other elements for varying purposes.
The type attribute describes the target of a cross-reference and may generate cross-reference text based on that description. Only the <xref> element can link to content below the topic level: other types of linking can target whole topics, but not parts of topics. Typically <xref> should also be limited to topic-level targets, unless the output is primarily print-oriented. Web-based referencing works best at the level of whole topics, rather than anchor locations within topics.
When the type attribute is unspecified, it should be determined by inspecting the target if possible. If the target cannot be inspected for some reason, the value should default to "topic".
If the type attribute is specified when referencing DITA content, it should match one of the values in the target's class attribute. For example, if type="topic", the link could be to a generic topic, or any specialization of topic, including concept, task, and reference. Applications may, but need not, issue a warning when the specified or inherited type attribute value does not match the target (or a specialization ancestor of the target).
Some possible values for use on the xref element and its specializations include:
Other values that may be used on any linking element include:
Other values can be used to indicate other types of topics or elements as targets. Processing is only required to support the above list, or specializations of types in that list. Supporting additional types as targets may require the creation of processing overrides.
In a note element, this defines the type of note. For example, if the note is a tip, the word Tip may be used to draw the reader's attention to it. If type is set to other, the value of the othertype attribute may be used. If you use othertype, many processors will require additional information on how to process the value. Allowable values for the type attribute are:
Return to main page.
OASIS DITA Language Specification v1.1 -- Committee Draft 13 February 2007
Copyright © OASIS Open 2005, 2007. All Rights Reserved.