When a DITA map (or branch of a DITA map) is referenced by another DITA map, by default, certain rules apply. These rules pertain to the cascading behaviors of attributes, metadata elements, and roles assigned to content (such as the role of "Chapter" assigned by a <chapter> element). Attributes and elements that cascade within a map generally follow the same rules when cascading from one map to another map; this topic covers the exceptions and additional rules that apply.
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>
a.ditamap is treated as if toc="no"
is specified on the root <map> element. This means that the topics
that are referenced by a.ditamap do not appear
in the navigation generated by test.ditamap (except
for branches within the map that explicitly set toc="yes").
b.ditamap is treated as if audience="developer"
is set on the root <map> element. If the audience attribute is
already set on the root <map> element within b.ditamap,
the value "developer" is added to any existing values.
c.ditamap is
treated as if print="no" is specified on that element. This means
that the topics within the branch with id="branch1" do not appear
in the printed output generated by test.ditamap (except
for nested branches within that branch that explicitly set print="yes").
c.ditamap is
treated as if platform="myPlatform" is specified on that element.
If the @platform attribute is already specified on the element with
id="branch", the value "myPlatform" is added to existing values.
test-2.ditamap<map>
<topicref href="a.ditamap" format="ditamap">
<topicmeta>
<shortdesc>This map contains information about Acme defects.</shortdesc>
</topicmeta>
</topicref>
<topicref href="b.ditamap" format="ditamap">
<topicmeta>
<audience type="programmer"/>
</topicmeta>
</topicref>
<mapref href="c.ditamap" format="ditamap"/>
<mapref href="d.ditamap" format="ditamap"/>
</map><map>
<topicmeta>
<audience type="writer"/>
</topicmeta>
<topicref href="b-1.dita"/>
<topicref href="b-2.dita"/>
</map>
test-2.ditamap is processed, the
following behaviour occurs:
a.ditamap.
b.ditamap combines
with the <audience> attribute that is already specified at the
top level of that map. The result is that the b-1.dita topic
and b-2.dita topic are processed as if they each
contained the following child <topicmeta> element:<topicmeta>
<audience type="programmer"/>
<audience type="writer"/>
</topicmeta>
NoteIt is possible that a specialization might define metadata
that should replace rather than add to metadata in the referenced
map, but DITA (by default) does not currently support this behavior.
|
‣ Parent topic: Section 1.2.3. DITA metadata
‣ Previous topic: Section 1.2.3.4. Cascading of attributes and metadata in a DITA map