<data>
Data is a generic component that represents metadata within a topic or map. Complex metadata is represented by nested data structures.
Usage information
The primary purpose of the <data>
element is as a specialization
base. Because it can nest, it can be used to create complex metadata structures. It is available in both block and inline contexts, which allows the
<data>
element to specify properties for most element
types.
A metadata property specified using a <data>
element usually
applies to the structure that contains the <data>
element.
When located in <prolog>
and <metadata>
elements, the property applies to the topic as a whole. When located in the
<topicmeta>
element, the property applies to the referenced
topic.
<data>
element. Use the <data>
element 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>
element as
unknown metadata. The contents of the
<data>
element SHOULD NOT be rendered.
Processors that recognize a particular <data>
element MAY make use of it to trigger specialized rendering.
Content model
(Text |
<audio>
|
<cite>
|
<include>
|
<keyword>
|
<ph>
|
<strong>
|
<em>
|
<b>
|
<i>
|
<line-through>
|
<overline>
|
<sup>
|
<sub>
|
<tt>
|
<u>
|
<q>
|
<term>
|
<text>
|
<tm>
|
<xref>
|
<data>
|
<sort-as>
|
<draft-comment>
|
<foreign>
|
<image>
|
<object>
|
<required-cleanup>
|
<title>
|
<video>
)*
Attributes
The following attributes are available on this element: data-element
attributes, link-relationship attributes, universal
attributes, and @keyref
.
The following attributes are available on this element: universal attributes and the attributes defined below.
@datatype
(data-element attributes)- Specifies the type of data contained in the
@value
attribute or within the<data>
element. A typical use of@datatype
will be the identifying URI for an XML Schema datatype. @format
(link-relationship attributes)- Specifies the format of the resource that is referenced. See The format attribute for detailed information on supported values and processing implications.
@href
(link-relationship attributes)- Specifies a reference to a resource. See The href attribute for detailed information on supported values and processing implications.
@keyref
- Specifies a key name that acts as a redirectable reference based on a key definition within a map. See The keyref attribute for information on using this attribute.
@name
(data-element attributes)- Defines a unique name for the object.
@scope
(link-relationship attributes)- Specifies the closeness of the relationship between the
current document and the referenced resource. The following values are valid:
local, peer,
external, and
-dita-use-conref-target.
See The scope attribute for detailed information on supported values and processing implications.
@type
(link-relationship attributes)- Describes the target of a reference. See The type attribute for detailed information on supported values and processing implications.
@value
(data-element attributes)- Specifies a value associated with the current property or element.
Examples
This section is non-normative.
This section contains examples of how the <data>
element can be
used.