Omni Systems, Inc. |  | Mif2Go User's Guide, Version 55 |  |  |  |  |

> 17 Converting to DocBook XML > 17.5 Nesting DocBook block elements > 17.5.2 Designating DocBook ancestor elements

### 17.5.2 Designating DocBook ancestor elements

For block elements such as <listitem> that can have more than one possible ancestry, map any paragraph formats to the intended (required) parent element, and if necessary, grandparent element, even great-grandparent element. List ancestors in hierarchical order. For example:

[DocBookParents]

; Frame para format (wildcards OK) = required parents

Heading* = section

Numbered1 = orderedlist listitem

Numbered = orderedlist listitem

Bulleted = itemizedlist listitem

TableTitle = table

Figure Title = mediaobject

Example = example

These settings specify, for example, that a Numbered1 paragraph (which is mapped to <para> in [DocBookParaTags]) has these ancestors:

<orderedlist>...<listitem>...</listitem>...</orderedlist>

Therefore, each Numbered1 paragraph starts a new <orderedlist> if and only if an <orderedlist> is not already open; and starts a new <listitem> if and only if an <listitem> under the <orderedlist> is not already open. To force a new <orderedlist><listitem> for Numbered1 paragraphs, you must also give the Numbered1 paragraph format first-child status under both parent and grandparent elements; see §17.5.6 Specifying first-child status for nested elements.

Note: For list items that can include more than one paragraph, map the paragraph format to <para>, then designate its including list element as a parent.

Use this mapping for formats such as lists, in which <listitem> elements are needed under <itemizedlist> or <orderedlist> in addition to the <para> elements mapped in [DocBookParaTags].

List ancestors in hierarchical order

If a parent element has more than one possible parent, and only one of those parents can be a grandparent of the paragraph format in question, list both the grandparent and parent, in hierarchical order.

Override individual ancestries

To override the [DocBookParents] assignment for a given instance of a paragraph format, place a DocBookParent marker in the paragraph. Make the content of the marker the name(s) of the ancestor element(s), in hierarchical order. A DocBookParent marker specifies the required ancestry for the current block element, overriding whatever is specified in [DocBookParents].

> 17 Converting to DocBook XML > 17.5 Nesting DocBook block elements > 17.5.2 Designating DocBook ancestor elements

| Mif2Go User's Guide: 17.5.1 Understanding how Mif2Go determines element nesting |  | Mif2Go User's Guide: 17.5.3 Fixing up interpolated ancestries |