Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

15 Converting to DITA XML > 15.5 Nesting DITA block elements > 15.5.2 Designating DITA ancestor elements


15.5.2 Designating DITA ancestor elements

For block elements such as <li> 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. Specify a parent only if it is required to prevent incorrect output. If you find “Parent Error” comments in the resulting XML, first try commenting out any related parent assignment in [DITAParents].

Note:  Do not specify parents for paragraph formats that are part of a FrameMaker table, nor for the table itself (see §15.6.3 Designating ancestors for <table> elements). If necessary you can specify parents for the contents of table cells, but do not go above <entry>. See §15.6.5.1 Omitting ancestries of DITA table components.

To specify required ancestors of elements mapped from FrameMaker formats (for example):

[DITAParents]

; Frame para format (wildcards OK) = required parents

Title = topic

Heading* = section

Numbered1 = ol li

Numbered = ol li

Bulleted = ul li

Figure Title = fig

Syntax = refsyn

Example = example

In this example a Numbered1 paragraph (which is mapped to <p> in [DITAParaTags]) must have these ancestors:

<ol>...<li>...</li>...</ol>

Therefore, each Numbered1 paragraph starts a new <ol> if and only if an <ol> is not already open; and starts a new <li> if and only if an <li> under the <ol> is not already open. To force a new <ol><li> for Numbered1 paragraphs, you must also give the Numbered1 paragraph format first-child status under both parent and grandparent elements; see §15.5.6 Avoiding invalid ancestries

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

Use this mapping for formats such as lists, in which <li> elements are needed under <ul> or <ol> in addition to the <p> elements mapped in [DITAParaTags].

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 [DITAParents] assignment for a given instance of a paragraph format, place a DITAParent marker in the paragraph. Make the content of the marker the name(s) of the ancestor element(s), in hierarchical order. A DITAParent marker specifies the required ancestry for the current block element, overriding whatever is specified in [DITAParents].

Not for FrameMaker table elements

Although you can specify ancestors for tables (see §15.6.3 Designating ancestors for <table> elements), do not specify parents for paragraph formats that are part of a FrameMaker table. Mif2Go uses a different mechanism for table components. You can specify parents for the contents of table cells, but do not go above <entry>. See §15.6.5.1 Omitting ancestries of DITA table components.

See also:

§15.6.3 Designating ancestors for <table> elements

§15.7.1 Designating ancestors for <image> and <fig> elements



15 Converting to DITA XML > 15.5 Nesting DITA block elements > 15.5.2 Designating DITA ancestor elements