#### 26.5.5 Specifying alternate ancestries for the same element

If your document uses the same paragraph format in several lineages, you can create a set of alternate ancestors for DITA2Go to choose from, depending on the context. The following predefined element sets are included in your project configuration file when you first set up a DocBook project. You can alter or delete these sets, and you can define additional sets.

To define sets of elements to be considered as alternate ancestors:

    [DocBookElementSets]
    ; $setname = DocBook elements in the set.
    ;  These element sets are predefined in the starting .ini for DocBook:
    $top = chapter appendix preface article
    $sections = sect1 sect2 sect3 sect4 sect5 section simplesect
    $text = sect1 sect2 sect3 sect4 sect5 section simplesect chapter appendix preface article entry
    $list = itemizedlist orderedlist

Each set name must start with a dollar sign ($). You must define each set as a collection of elements; you may not define one element set in terms of other element sets. The list of elements in the set must be all on the same line, even if it does not appear that way here.

Note: Element set $list does not include element simplelist, because simplelist is more restricted as to content than the other list types.

You can use an element set name in place of an element name in [DocBookParents], in [DocBookFirst], or in the corresponding DocBookParent and DocBookFirst PI markers. For example:

    [DocBookParents]
    Body = $text
    Body2 = $text $list listitem

Any element in the set is acceptable at the point where it appears in the hierarchical sequence. There is no equivalent PI marker.

Previous Topic: 26.5.4 Deciding when to fully specify ancestry

Next Topic: 26.5.6 Specifying first-child status for nested elements

Parent Topic: 26.5 Nesting DocBook block elements

Sibling Topics:

26.5.1 Understanding how DITA2Go determines element nesting

26.5.2 Designating DocBook ancestor elements

26.5.3 Fixing up interpolated ancestries

26.5.4 Deciding when to fully specify ancestry

26.5.6 Specifying first-child status for nested elements

26.5.7 Specifying full ancestry for nested sections

26.5.8 Closing DocBook ancestor elements

26.5.9 Opening DocBook ancestor elements

26.5.10 Configuring multi-paragraph list items

26.5.11 Specifying DocBook element levels

Table of Contents • Index