Determining effective attribute values
Topic to be moved to more appropriate location: how to determine effective attribute values.
Need to reconcile the two different existing lists, in Processing cascading attributes in a map and Binding controlled values to an attribute.
From "processing cascading attributes"
For attributes within a map, the following processing order MUST occur:
- The
@conref
and@keyref
attributes are evaluated. - The explicit values specified in the document instance are evaluated. For
example, a
<topicref>
element with the@toc
attribute set to "no" will use that value. - The default or fixed attribute values are evaluated. For example, the
@toc
attribute on the<reltable>
element has a default value of "no". - The default values that are supplied by a controlled values file are evaluated.
- The attributes cascade.
- The processing-supplied default values are applied.
- After the attributes are resolved within the map, they cascade to referenced maps.
Note (non-normative):The processing-supplied default values do not cascade to other maps. For example, most processors will supply a default value of
toc="yes"
when no@toc
attribute is specified. However, a processor-supplied default oftoc="yes"
MUST NOT override a value oftoc="no"
that is set on a referenced map. If thetoc="yes"
value is explicitly specified, is given as a default through a DTD, XSD, RNG, or controlled values file, or cascades from a containing element in the map, it MUST override atoc="no"
setting on the referenced map. See Map-to-map cascading behaviors for more details. - Repeat steps 1 to 4 for each referenced map.
- The attributes cascade within each referenced map.
- The processing-supplied default values are applied within each referenced map.
- Repeat the process for maps referenced within the referenced maps.
From "binding controlled values"
To determine the effective value for a DITA attribute, processors check for the following in the order outlined:
- An explicit value in the element instance
- A default value in the XML grammar
- Cascaded value within the document
- Cascaded value from a higher level document to the document
- A default controlled value, as specified in the
<defaultSubject>
element - A value set by processing rules