Avoiding chunk structure in topics

The hierarchy of information chunks, and the sequence that chunks should appear in published collections, should be defined in the ditamap and not through section elements or nested topics.

A chunk, in this context, is an identifiable block or unit of information, and chunking is the process of organising information into units.

DITA has a section element, used to divide topics into subsets of information directly related to the topic. When writing content in DITA, you will sometimes have to choose between chunking information into separate topics, or using a single topic with the information chunked into sections within that topic.

In nearly all cases, separate, simple topics should be preferred to sections.

One of the reasons why section elements should be avoided is that they result in hierarchy and sequence (document structure) being embedded in the topic. If a chunk of content is contained within a section instead of a topic, it must always appear in the same sequence within the containing topic. Structured as a topic, the information can appear in any sequence, in any hierarchy, in any collection.

Sections are more difficult to re-use; the smaller the granularity of a document, the more re-use opportunities there are.

Cases where sections may be appropriate include single topics where the idea covered has many facets. DITA does not permit sections within sections (nested sections).

It is technically possible to nest topics of different information types within a ditabase (or composite) topic type. However, the ditabase topic is not intended for this purpose. It should only be used to contain re-use elements for mixed information types.

Using separate DITA topics doesn't mean that the topics must be generated as separate topics in the output. If necessary, DITA source topics can be grouped into a single output topic, for example, through the chunking attribute in the ditamap topicref.

The ditamap is the correct place for hierarchy and sequence to be recorded.