#### 26.5.6 Specifying first-child status for nested elements

To specify parent elements in which the paragraph format mapped to a given block element must appear as the first child:

    [DocBookFirst]
    ; para format = parents under which the current block element
    ;  (or one of its parents) must be the first child.
    Numbered1 = orderedlist listitem
    Numbered = listitem
    Bulleted = listitem

If the parent element you assign to a paragraph format has more than one possible parent, and the paragraph format in question needs to be first only for one of its possible grandparents, list both the grandparent and parent, separated by spaces. You can list as many ancestors as necessary to fully specify first-child status for the paragraph format. List the ancestors in hierarchical order. The list must match the ancestor list in [DocBookParents]; see §26.5.2 Designating DocBook ancestor elements.

Use these settings mainly for lists, to ensure that a paragraph format starts a new list item or a new list. For example, these settings specify the following for the list paragraph formats mapped to <para> in [DocBookParaTags]:

- A Numbered1 <para> element must be the first child of its parent <listitem> element, which <listitem> element must be the first child of its <orderedlist> parent; this setting forces first-child status for the entire lineage of the elements listed, not just the last.
- A Numbered <para> element or a Bulleted <para> element must be the first child of its parent <listitem> element.

To override the [DocBookFirst] assignment for a given instance of a paragraph, place a DocBookFirst PI marker in the paragraph. Make the content of the marker the name(s) of the desired ancestor element(s), in hierarchical order. A DocBookFirst marker specifies that the current block element must be the first child of its listed ancestor elements, overriding whatever is specified in [DocBookFirst].

Previous Topic: 26.5.5 Specifying alternate ancestries for the same element

Next Topic: 26.5.7 Specifying full ancestry for nested sections

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.5 Specifying alternate ancestries for the same element

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