Processing cascading attributes in a map
Certain rules apply to processors when they process cascading attributes in a map.
When determining the value of an attribute, processors MUST evaluate each attribute on each individual element in a specific order. This order is specified in the following list. Applications MUST continue through the list until a value is established or until the end of the list is reached, at which point no value is established for the attribute. In essence, the list provides instructions on how processors can construct a map where all attribute values are set and all cascading is complete.
- 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, any values that do not come
from processing-supplied defaults will cascade to referenced 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"
does 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, RNG, or controlled values file, or cascades from a containing element in the map, it will 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.
For example, in the case of <topicref toc="yes">
, applications must
stop at item 2 in the list; a value is specified for @toc
in the
document instance, so @toc
values from containing elements will not
cascade to that specific <topicref>
element. The
toc="yes"
setting on that <topicref>
element
will cascade to contained elements, provided those elements reach item 5
when evaluating the @toc
attribute.