- Examples: Key definition
The <topicref>
element, and any specialization of <topicref>
that allows the @keys
attribute, can be used to define keys.
- Examples: Key definitions for variable text
Key definitions can be used to store variable text, such as product names and user-interface labels. Depending on the key definition, the rendered output might have a link to a related resource.
- Example: Scoped key definitions for variable text
Scoped key definitions can be used for variable text. This enables you to use the same DITA topic multiple times in a DITA map, and in each instance the variable text can resolve differently.
- Example: Duplicate key definitions within a single map
In this scenario, a DITA map contains duplicate key definitions. How a processor finds the effective key definition depends on document order and the effect of filtering applied to the key definitions.
- Example: Duplicate key definitions across multiple maps
In this scenario, the root map contains references to two submaps, each of which defines the same key. The effective key definition depends upon the document order of the direct URI references to the maps.
- Example: Key definition with key reference
When a key definition also specifies a key reference, the key reference must also be resolved in order to determine the effective resources bound to that key definition.
- Example: References to scoped keys
You can address scoped keys from outside the key scope in which the keys are defined.
- Example: Key definitions in nested key scopes
In this scenario, the root map contains nested key scopes, each of which contain duplicate key definitions. The effective key definition depends on key-scope precedence rules.
- Example: Link redirection
This scenario outlines how different authors can redirect links to a common topic by using key definitions. This could apply to <xref>
, <link>
, or any elements (such as <keyword>
or <term>
) that become navigation links.
- Example: Link modification or removal
This scenario outlines how different authors can effectively remove or modify a <link>
element in a shared topic.
- Example: Links from term or keyword elements
The @keyref
attribute enables authors to specify that references to keywords or terms in a DITA topic can be rendered as a link to an associated resource.
- Example: conref redirection
The @conkeyref
attribute enables authors to share DITA topics that reuse content. It also enables map authors to specify different key definitions for common keys.
- Example: Key scopes and omnibus publications
Key scopes enable you to create omnibus publications that include multiple submaps that define the same key names for common items, such as product names or common topic clusters.
- Example: How key scopes affect key precedence
For purposes of key definition precedence, the scope-qualified key definitions from a child scope are considered to occur at the location of the scope-defining element within the parent scope.
- Example: Keys and collaboration
Keys enable authors to collaborate and work with evolving content with a minimum of time spent reworking topic references.