Can branch and filtering conditions be managed at the DITA map level?

In DITA, branching and filtering conditions can be managed at the DITA map level. DITA maps serve as containers for topics and other maps, and they can define conditional processing that affects all the content they reference.

DITA maps are files that define the structure of documentation. They specify the order and hierarchy of topics and may include references to content.

Conditional processing, including branching and filtering conditions, can be applied at the map level. When conditions are set in a DITA map, they affect all the topics and maps referenced within that map. Map-level conditions can be defined for various purposes, such as output filtering, audience targeting, or product variations. These conditions are often defined in the map header, affecting the entire map content.

Example:

A DITA map for a software application needs to accommodate two separate manuals, one for Version 1.0 and one for Version 2.0.

DITA Map with Version Conditions:


<map>
    <title>User Manual</title>
    <mapref href="introduction.ditamap"/>
    <mapref href="features.ditamap"/>
    <mapref href="tutorials.ditamap"/>
    <props outputclass="user-manual"/>

    <!-- Define conditions for different software versions -->
    <conkeydef keys="version"/>
    <conkeyref keys="version" conref="conditional-processing.dita#version-conditions"/>
</map>

Conditional Processing Definitions (conditional-processing.dita):


<conkeydef keys="version">
    <topicmeta>
        <keywords>
            <keyword>V1.0</keyword>
            <keyword>V2.0</keyword>
        </keywords>
    </topicmeta>
</conkeydef>

Version-Specific Content in Submaps:

In this example, a “version” condition is defined at the map level, which applies to the entire manual.

Each topic or submap (introduction, features, tutorials) can reference content based on this condition.

By setting map-level conditions, the entire structure of the manual adapts to different versions of the software. Depending on the “version” condition, content specific to Version 1.0 or Version 2.0 is included or excluded, allowing for maintaining multiple variations of the manual within the same DITA map.