Example: How the @cascade
attribute functions
The following example illustrates how the @cascade
attribute can be used
to fine tune how the values for the @platform
attribute apply to topics referenced
in a DITA map.
Here a DITA map contains a collection of topics that apply to Windows, Linux, and Macintosh OS; it also contains a topic that is only applicable to users running the application on Linux.
<map product="PuffinTracker" platform="win linux mac" cascade="nomerge">
<title>Puffin Tracking Software</title>
<topicref href="introduction.dita"/>
<topicref href="setting-up-the-product.dita"/>
<topicref href="linux-instructions.dita" platform="linux"/>
</map>
The values of the @platform
attribute set at the map level cascade throughout
the map and apply to the introduction.dita and
setting-up-the-product.dita topics. However, since the value of the
@cascade
attribute is set to nomerge, the value of the
@platform
attribute for the linux-instructions.dita topic
does not merge with the values that cascade from above in the DITA map. The effective value of
the @platform
attribute for linux-instructions.dita is
linux.
The same results are produced by the following mark-up:
<map product="PuffinTracker" platform="win linux mac">
<title>Puffin Tracking Software</title>
<topicref href="introduction.dita"/>
<topicref href="setting-up-the-product.dita"/>
<topicref href="linux-instructions.dita" platform="linux" cascade="nomerge"/>
</map>