Attribute generalization

Darwin Information Typing Architecture (DITA) Version 1.2

Document
Darwin Information Typing Architecture (DITA) Version 1.2

There is a particular syntax to generalize attributes that have been specialized from the @props or @base attribute. Specialization-aware processors should be able to recognize and process both the specialized and generalized forms of an attribute as being 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, given that "jobrole" is an attribute specialized from "person", which in turn is specialized from "props":

  • jobrole="programmer" can be generalized to person="jobrole(programmer)" or to props="jobrole(programmer)"
  • props="jobrole(programmer)" can be respecialized to person="jobrole(programmer)" or to jobrole="programmer"

In this example, 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, but are used by generalizing 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.

A single element may not contain both generalized and specialized values for the same attribute. For example, this element:
<p person="jobrole(programmer)" jobrole="admin">...</p>
provides two values for the @jobrole attribute, but one is 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 has been generalized and then edited using a specialized document type.