#### 24.5.1 Understanding how DITA2Go determines element nesting

For each element, DITA2Go considers whether that element can go inside the current parent element. If not, DITA2Go uses heuristic methods based on the possible parents, level limitations, and current context. To provide a parent element DITA2Go selects, in alphabetical order, the first wrapper element that can validly fit and that is permitted by your settings. DITA2Go does not interpret the DTD to determine element nesting.

For example, in the absence of project configuration settings that designate valid parent elements, you might find that most of your content ends up nested in <abstract>, because “abstract” is near the beginning of the alphabet.

As another example, suppose your document uses a sequential structure for steps in a procedure: paragraph format Step1 for the first step, followed by several StepNext paragraphs, all containing both commands and informational text. To convert this structure to a hierarchical DITA structure, with paragraphs in both formats becoming <step> children of a <steps> element, you would specify just one setting (see §24.4.3 Mapping paragraph formats to DITA block elements):

    [DITAParaTags]
    Step* = step

The first paragraph in the group forces creation of <steps>, because DITA requires <steps> or <steps-unordered> as the parent of <step>, and of the two valid candidate parents, <steps> comes first alphabetically. As soon as DITA2Go encounters a paragraph format mapped to an element that is not valid in <steps>, the parent tag is closed.

For problem cases, you can use a DITALevel PI marker to explicitly set the level for an element; see §24.5.12 Specifying DITA element levels. However, for nested lists, use a different approach; see §24.5.5 Specifying alternate ancestries for the same element.

Previous Topic: 24.5 Nesting DITA block elements

Next Topic: 24.5.2 Designating DITA ancestor elements

Parent Topic: 24.5 Nesting DITA block elements

Sibling Topics:

24.5.2 Designating DITA ancestor elements

24.5.3 Fixing up interpolated ancestries

24.5.4 Deciding when to fully specify ancestry

24.5.5 Specifying alternate ancestries for the same element

24.5.6 Avoiding invalid ancestries

24.5.7 Specifying first-child status for nested elements

24.5.8 Configuring nested lists

24.5.9 Closing DITA ancestor elements

24.5.10 Opening DITA ancestor elements

24.5.11 Configuring multi-paragraph list items

24.5.12 Specifying DITA element levels

Table of Contents • Index