Search code examples
xmldita

Nested content in DITA


I am quite new to DITA authoring, and trying to accomplish a quite simple task.

I have separated chapter in topics, but within topics I have nested content.

I gave a try to sections, but seems I cannot nest them, and also sectiondiv doesn't have title. Also nesting topics doesn't seem the right way to go.

This what I need to have:

Chapter title
   introduction text
   title 1
   text....
      title 1.1
         text....
         title 1.1.1
         text....
   title 2
      title 2.1
      text....
      title 2.2
      text....

What's the best way to structure the information with DITA ?


Solution

  • You are going to need to rework some of the content in your current topics that contain nested content. You have two choices:

    • Move each topic into a separate file and aggregate then for delivery using a DITA map
    • Use nested topics within your current files to create the hierarchy that you want

    These are the two DITA architectural mechanisms for creating a navigational hierarchy. Either of these approaches will yield the following result; do note that I have added numbering for the chapter:

    Chapter title A
    introduction text
    title A.1
    text....
    title A.1.1
    text....
    title A. 1.1.1
    text....
    title A.2
    title A.2.1
    text....
    title A.2.2
    text....