Data
Data is a generic component that represents metadata within a topic or map. Complex metadata is represented by nested data structures.
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 syntax for data in MDITA core profile. In the MDITA extended profile, data is represented by variables declared in a YAML front-matter header. The front matter must be the first block in the file, and it must be set between triple-dashed lines.
|
Usage information
A metadata property specified using a <data>
component usually
applies to the structure that contains the <data>
component.
<data>
component. Use the <data>
component
only for properties; do not use it to embed text as part of the content flow. Rendering expectations
By default, processors SHOULD treat a data component as unknown metadata. The contents of the data component SHOULD NOT be rendered.
Processors that recognize a particular data component MAY make use of it to trigger specialized rendering.
Attributes
The available attributes vary based on the authoring format:
- XDITA
- The following attributes are available on this element: data-element attributes,
link relationship attributes, localization attributes, universal
attributes,
@keyref
, and@props
. - HDITA
- The following attributes are available on this element: link relationship attributes, localization attributes, universal
attributes,
@keyref
, and@props
. - MDITA
- For the MDITA core profile, the equivalent
of the XDITA
@keyref
attribute is supported. For the MDITA extended profile, attributes can be specified by using the HDITA representation.
Examples
This section is non-normative.
This section contains examples of how the data component can be used in the three authoring components: