Cascading of metadata elements from map to map

Elements that are contained within <topicmeta> or <metadata> elements follow the same rules for cascading from map to map as the rules that apply within a single DITA map.

For a complete list of which elements cascade within a map, see the column "Does it cascade to child <topicref> elements?" in the topic Reconciling topic and map metadata elements.

Note: It 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.

For example, consider the following code examples:

Figure 1. 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>
Figure 2. b.ditamap
<map>
    <topicmeta>
        <audience type="writer"/>
    </topicmeta>
    <topicref href="b-1.dita"/>
    <topicref href="b-2.dita"/>
</map>
When test-2.ditamap is processed, the following behavior occurs:
  • Because the <shortdesc> element does not cascade, it does not apply to the DITA topics that are referenced in a.ditamap.
  • Because the <audience> element cascades, the <audience> element in the reference to b.ditamap combines with the <audience> element that is specified at the top level of b.ditamap. The result is that the b-1.dita topic and b-2.dita topic are processed as though hey each contained the following child <topicmeta> element:
    <topicmeta>
        <audience type="programmer"/>
        <audience type="writer"/>
    </topicmeta>