Can a DITA map contain other DITA maps?

Yes, a DITA map can contain other DITA maps, allowing for a hierarchical organization of topics and submaps. This concept enables the creation of complex and structured documentation systems with multiple levels of organization.

DITA maps serve as containers for organizing and arranging individual topics, and they can also include references to other DITA maps. This hierarchical approach helps manage large and interconnected documentation projects efficiently. This is achieved by nested DITA maps, hierarchical organization, and ordering and relationships.

Nested DITA Maps:

Within a DITA map, references to other DITA maps can be included by using <mapref> elements. These <mapref> elements act as pointers to external DITA map files.

Hierarchical Organization:

By including DITA maps within other DITA maps, a hierarchical structure can be established. This structure allows breaking down a documentation project into smaller, more manageable sections or chapters, each represented by a separate DITA map. These submaps can, in turn, include references to individual topics or even more submaps.

Ordering and Relationships:

Just like topics, the order of <mapref> elements within a DITA map defines the sequence in which submaps are presented to readers. Relationships can also be established between submaps or between topics in different maps, enhancing navigation and the user experience.

Example:

This is a DITA map containing references to other DITA maps:

<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
    <title>User Guide for Product XYZ</title>
    
    <!-- Reference to a submap for the introduction -->
    <mapref href="introduction-submap.ditamap">
        <title>Introduction</title>
    </mapref>

    <!-- Reference to a submap for product features -->
    <mapref href="features-submap.ditamap">
        <title>Product Features</title>
    </mapref>

    <!-- Reference to a troubleshooting submap -->
    <mapref href="troubleshooting-submap.ditamap">
        <title>Troubleshooting</title>
    </mapref>
</map>