How are mixed-topic documents structured in DITA?

Mixed-topic documents in DITA are structured to include a combination of different DITA topic types within a single document. This approach allows authors to create documents that incorporate various types of content, each tailored to its specific purpose or role in the document.

The structure of mixed-topic documents in DITA involves defining a hierarchy of topics within the document. Each topic type represents a distinct aspect of the content. The overall document can have a hierarchical structure with a root topic that serves as the main container for other topics.

Content Organization

Root Topic: At the top level of the document hierarchy, there is often a root topic that encapsulates the entire document. The root topic may include a document title and other metadata.

Subtopics: Within the root topic or at deeper levels of the hierarchy, various subtopics are included. These subtopics can be of different DITA topic types, such as concept, task, reference, or any specialized topic type. Each subtopic addresses a specific aspect of the content.

Arranging Mixed Topics

Arranging mixed topics in this manner facilitates content organization, cross-referencing, and makes full use of DITA elements.

Content Organization: Subtopics can be organized hierarchically, with parent topics containing child topics. The organization depends on the logical flow and structure of the content.

Cross-Referencing: Cross-references between topics can be used to link related information. DITA provides mechanisms for linking and referencing content across topics.

DITA Elements: Each topic within the document can include DITA elements like <title>, <conbody> (for the main content), and other relevant elements specific to the topic type.

Example: A Mixed-Topic DITA Document


<document>
  <title>Product User Guide</title>

  <!-- Concept Topic -->
  <concept>
    <title>Introduction to Product X</title>
    <conbody>
      <p>Product X is a versatile tool designed for...</p>
      <!-- Additional content -->
    </conbody>
  </concept>

  <!-- Task Topic -->
  <task>
    <title>Getting Started with Product X</title>
    <taskbody>
      <steps>
        <step>Open Product X.</step>
        <step>Follow these steps to set up...</step>
        <!-- Additional steps -->
      </steps>
    </taskbody>
  </task>

  <!-- Reference Topic -->
  <reference>
    <title>Technical Specifications</title>
    <refbody>
      <section>
        <title>Product X Specifications</title>
        <p>Here are the technical specifications...</p>
        <!-- Additional specifications -->
      </section>
    </refbody>
  </reference>
</document>
    

In this example:

  • The root topic, <document>, encapsulates the entire user guide.
  • Three subtopics are included: a “concept” topic for introduction, a “task” topic for getting started instructions, and a “reference” topic for technical specifications.
  • Each subtopic includes a title and content specific to its purpose.