Key definition
A key definition provides a simple way to define a key without making the definition itself a part of rendered content.
Syntax
The syntax for representing this component varies depending on the authoring format:
Authoring format | Syntax and example |
---|---|
XDITA |
|
HDITA |
|
MDITA |
There is no specific support in the MDITA core profile. If needed, use an HDITA snippet. |
Usage information
The key definition component is a convenience component. It is equivalent
to a topic reference component that defines a key while also setting
@processing-role
to resource-only. Attributes defaulted
on the key definition component ensure that key definitions do not appear in the TOC, do not
add extra links, and are not rendered as topics.
Attributes
The available attributes vary based on the authoring format:
- XDITA and HDITA
- The following attributes are available on this element: localization attributes,
link relationship attributes, universal
attributes,
@keys
,@props
, and@processing-role
. - MDITA
- There is no attribute support for the MDITA core profile. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
- The
@keys
attribute is required. - The
@href
attribute might be omitted when the key definition is used for variable text. - The
@processing-role
attribute has a default value of resource-only.
Examples
This section is non-normative.
The section contains examples of how the key definition component can be used. Key definitions can be used to define keys for topics, as well as variable text.