220.127.116.11 Attribute generalization
DITA provides a syntax to generalize attributes that have been specialized from the
@base attribute. Specialization-aware processors
SHOULD process both the specialized and
generalized forms of an attribute as equivalent in their values.
When a specialized attribute is generalized to an ancestor attribute, the value of the
ancestor attribute consists of the name of the specialized attribute followed by its
specialized value in parentheses. For example, if
@jobrole is an attribute
@person, which in turn is specialized from
jobrole="programmer"can be generalized to
props="jobrole(programmer)"can be respecialized to
In this example, processors performing generalization and respecialization can use the
@domains attribute to determine the ancestry of the specialized
@jobrole attribute, and therefore the validity of the specialized
@person attribute as an intermediate target for generalization.
If more than one attribute is generalized, the value of each is separately represented in this way in the value of the ancestor attribute.
Generalized attributes are typically not expected to be authored or edited directly. They are used by processors to preserve the values of the specialized attributes during the time or in the circumstances in which the document is in a generalized form.
@otherpropsattributes allow grouped values that reuse the generalized syntax described here; however, these attributes are not specialized or specializeable. For these attributes, it can be typical to author or edit the grouped values directly.
<p>element provides two values for the
@jobroleattribute, one in a generalized syntax and the other in a specialized syntax:
This is an error condition, since it means the document has been only partially generalized, or that the document has been generalized and then edited using a specialized document type.
<p person="jobrole(programmer)" jobrole="admin"> <!-- ... --> </p>