RELAX NG: Coding requirements for attribute domain modules

Darwin Information Typing Architecture (DITA) Version 1.3 Part 3: All-Inclusive Edition

version
1.3
author
OASIS DITA Technical Committee

An attribute domain vocabulary module declares a new attribute specialized from either the props or base attribute. An attribute domain module defines exactly one new attribute type.

All vocabulary and constraint modules must document their domains attribute contribution. The value of the contribution is constructed according to the rules found in domains attribute rules and syntax. The OASIS grammar files use a domainsContribution element to document the contribution; this element is used to help enable generation of DTD and XSD grammar files. An XML comment or a:documentation element can also be used.

An attribute domain's name is the name of the attribute plus "Att". For example, for the attribute named "deliveryTarget" the attribute domain name is "deliveryTargetAtt". The attribute domain name is used to construct pattern names for the domain.

An attribute domain consists of one file, which has three sections:

Domains attribute contribution

The domains contribution must be documented in the module. The value is constructed according to the rules found in domains attribute rules and syntax.

Attribute extension pattern
The attribute extension pattern extends either the props or base attribute set pattern to include the attribute specialization.
For specializations of props the pattern is named props-attribute-extensions. The pattern specifies a combine value of "interleave", and the content of the pattern is a reference to the specialized attribute declaration pattern. For example:
<define name="props-attribute-extensions" combine="interleave">
    <ref name="deliveryTargetAtt-d-attribute"/>
</define>
For specializations of base the pattern is named base-attribute-extensions. The pattern specifies a combine value of "interleave", and the content of the pattern is a reference to the specialized attribute declaration pattern. For example:
<define name="base-attribute-extensions" combine="interleave">
    <ref name="myBaseSpecializationAtt-d-attribute"/>
</define>
Attribute declaration pattern
The specialized attribute is declared in a pattern named domainName-d-attribute. The attribute must be defined as optional. For example, the deliveryTarget specialization of props is defined as follows:
<define name="deliveryTargetAtt-d-attribute">
  <optional>
    <attribute name="deliveryTarget"/>
  </optional>    
</define>