###### 2.1.4.3.6 Attribute generalization

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.

Previous Topic: 2.1.4.3.5 Generalization

Next Topic: 2.1.4.3.7 Specializing foreign or unknown content

Parent Topic: 2.1.4.3 Specialization

Sibling Topics:

2.1.4.3.1 Vocabulary modules

2.1.4.3.2 Requirements for specialized element types and attributes

2.1.4.3.3 Element type specialization hierarchy declaration (the @class attribute)

2.1.4.3.4 Domain usage declaration (the @domains attribute)

2.1.4.3.5 Generalization

2.1.4.3.7 Specializing foreign or unknown content

2.1.4.3.8 Specialization module coding requirements