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="intro.dita" navtitle="Introduction"/>
  <topicref href="setup.dita" navtitle="Setting up the product"/>
  <topicref href="linux-instructions.dita" navtitle="Linux instructions" platform="linux"/>
</map>

The values of the @platform attribute set at the map level cascade throughout the map and apply to the "Introduction" and "Setting up the product" topics. However, since the value of the @cascade attribute is set to "nomerge", the value of the @platform attribute for the "Linux instructions" 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="intro.dita" navtitle="Introduction"/>
  <topicref href="setup.dita" navtitle="Setting up the product"/>
  <topicref href="linux-instructions.dita" navtitle="Linux instructions" platform="linux" cascade="nomerge"/>
</map>