Certain map-level attributes cascade throughout a map, which facilitates attribute and metadata management. When attributes cascade, they apply to the elements that are children of the element where the attributes were specified. Cascading applies to a containment hierarchy, as opposed to a element-type hierarchy.
The following attributes cascade when set on the
<map> element or
when set within a map:
@propsand any attribute specialized from
@cascadeattribute is set to avoid adding values to attributes. For attributes that take a single value, the closest value defined on a containing element takes effect. In a relationship table, row-level metadata is considered more specific than column-level metadata, as shown in the following containment hierarchy:
<topicref>container (more specific)
@cascade attribute can be used to modify the additive nature of
attribute cascading (though it does not turn off cascading altogether). The attribute has
two predefined values: "merge" and "nomerge".
@cascadeattribute and was the only defined behavior for DITA 1.2 and earlier.
<topicref>elements that specify a different value for a specific metadata attribute. If the cascading value for an attribute is already merged based on multiple ancestor elements, that merged value continues to cascade until a new value is encountered (that is, setting cascade="nomerge" does not undo merging that took place on ancestors).
Implementers MAY define their own custom, implementation-specific tokens. To avoid name conflicts between implementations or with future additions to the standard, implementation-specific tokens SHOULD consist of a prefix that gives the name or an abbreviation for the implementation followed by a colon followed by the token or method name.
@audienceattribute. The following rules apply:
@cascadeattribute MUST precede any implementation-specific tokens, for example, cascade="merge appToken:audience".
@cascadevalue. In that case, the syntax for specifying those values consists of the implementation-specific token, followed by a parenthetical group that uses the same syntax as groups within the
@otherpropsattributes. For example, a token that applies to only
@productcould be specified as cascade="appname:token(platform product)".
@cascadeattribute in use
Consider the following code examples:
<map audience="a b" cascade="merge"> <topicref href="topic.dita" audience="c"/> </map>
<map audience="a b" cascade="nomerge"> <topicref href="topic.dita" audience="c"/> </map>
For map A, the values for the attribute are merged, and the effective value of the
@audience attribute for topic.dita is "a b c". For
map B, the values for the attribute are not additive, and the effective value of the
@audience attribute for topic.dita is "c".
In the following example, merging is active at the map level but turned off below:
<map platform="a" product="x" cascade="merge"> <topicref href="one.dita" platform="b" product="y"> <topicref href="two.dita" cascade="nomerge" product="z"/> </topicref> </map>
In map C, the reference to one.dita has effective merged values of "a
@platform and "x y" for
The reference to two.dita turns off merging, so the explicit
@product value of "z" is used (it does not merge with ancestor values).
@platform attribute is not present, so the already-merged value of "a b"
continues to cascade and the effective value of
@platform on this
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.
For example, in the case of <topicref toc="yes">,
applications MUST stop at item 2 in the list; a value is
@toc in the document instance, so
from containing elements will not cascade to that specific
element. The toc="yes" setting on that
element will cascade to contained elements, provided those elements reach item 5 below when evaluating
@keyrefattributes are evaluated.
<topicref>element with the
@tocattribute set to "no" will use that value.
@tocattribute on the
<reltable>element has a default value of "no".
@tocattribute is specified. However, a processor-supplied default of toc="yes" MUST not override a value of toc="no" that is set on a referenced map. If the toc="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 a toc="no" setting on the referenced map. See Map-to-map cascading behaviors for more details.
Return to main page.
Standards Track Work Product
|Copyright © OASIS Open 2015. All Rights Reserved.||21 August 2015|