Cascading of attributes from map to map
The following attributes cascade from map to map:
- @audience, @platform, @product, @otherprops, @rev
- @props and any attribute specialized from @props
- @linking, @toc, @print, @search
- @type
- @translate
- @processing-role
- @cascade
Note that the above list excludes the following attributes:
- @format
- The @format attribute must be set to "ditamap" in order to reference a map or a branch of a map, so it cannot cascade through to the referenced map.
- @xml:lang and @dir
- Cascading behavior for @xml:lang is defined in The @xml:lang attribute. The @dir attribute work the same way.
- @scope
- The value of the @scope attribute describes the map itself, rather than the content. When the @scope attribute is set to "external", it indicates that the referenced map itself is external and unavailable, so the value cannot cascade into that referenced map.
The @class attribute is used to determine the processing roles that cascade from map to map. See Cascading of roles from map to map for more information.
As with values that cascade within a map, the cascading is additive if the attribute permits multiple values (such as @audience). When the attribute only permits one value, the cascading value overrides the top-level element.
Example of attributes cascading between maps
For example, assume the following references in
test.ditamap
:
<map> <topicref href="a.ditamap" format="ditamap" toc="no"/> <mapref href="b.ditamap" audience="developer"/> <topicref href="c.ditamap#branch1" format="ditamap" print="no"/> <mapref href="c.ditamap#branch2" platform="myPlatform"/> </map>
- The map
a.ditamap
is treated as iftoc="no"
is specified on the root <map> element. This means that the topics that are referenced bya.ditamap
do not appear in the navigation generated bytest.ditamap
(except for branches within the map that explicitly settoc="yes"
). - The map
b.ditamap
is treated as ifaudience="developer"
is set on the root <map> element. If the @audience attribute is already set on the root <map> element withinb.ditamap
, the value "developer" is added to any existing values. - The element with
id="branch1"
within the mapc.ditamap
is treated as ifprint="no"
is specified on that element. This means that the topics within the branch withid="branch1"
do not appear in the printed output generated bytest.ditamap
(except for nested branches within that branch that explicitly setprint="yes"
). - The element with
id="branch2"
within the mapc.ditamap
is treated as ifplatform="myPlatform"
is specified on that element. If the @platform attribute is already specified on the element withid="branch"
, the value "myPlatform" is added to existing values.