Examples of keys
This section of the specification contains examples and scenarios. They illustrate
a
wide variety of ways that keys can be used.
In this section:
- Examples: Key definitionThe <topicref> element, and any specialization of <topicref> that allows the @keys attribute, can be used to define keys.
- Examples: Key definitions for variable textKey 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 textScoped 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 mapIn 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 mapsIn 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 referenceWhen 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 keysYou can address scoped keys from outside the key scope in which the keys are defined.
- Example: Key definitions in nested key scopesIn 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 redirectionThis 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 removalThis scenario outlines how different authors can effectively remove or modify a <link> element in a shared topic.
- Example: Links from <term> or <keyword>
elementsThe @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 redirectionThe @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 publicationsKey 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 precedenceFor 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 collaborationKeys enable authors to collaborate and work with evolving content with a minimum of time spent reworking topic references.
Parent topic: Indirect key-based addressing