Inheritance and cascades in ditamaps

Properties in ditamaps sometimes cascade from parent elements to child elements. Some values in ditamaps also override the equivalent values in referenced topics.

In the hierarchy section of a ditamap, attribute values in parent topicref elements cascade down to child elements. For example, setting an audience attribute of administrator in a parent topicref will result in all child topicref elements being treated, during processing to an output format, as though they also have an audience attribute of administrator. So if you want to exclude a "chapter" of a publication from an output using conditional processing, you only need to set the metadata attribute on the chapter parent topicref element, and not on all individual topicref elements.

If a conflicting attribute is set at a lower level, such as the case where a parent product attribute is set to pro and a child product attribute is set to lite, the setting on the child topicref will override the setting on the parent.

When you want to set attribute values for a group of topics that do not have a common parent topicref, you can use the topicgroup element created for this very purpose. A topicgroup simply serves as a non-hierarchical container for topicref elements in a ditamap. It has the same attributes as a topicref element.

Some elements and attributes in a ditamap are specifically designed to override the corresponding settings in the topic itself. For example, a navigation title (navtitle) attribute of the topicref in a ditamap will override the topic's title element as the source for the text to be used in the output table of contents.