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.8 Configuring nested lists


15.5.8 Configuring nested lists

If your document includes nested ordered or unordered lists (or a mix of the two), it is best to specify a set of ancestor elements that includes both; see §15.5.5 Specifying alternate ancestries for the same element. For example:

[DITAElementSets]

$list= ol ul

This particular element set is predefined in the starting configuration file for DITA output. Specifying $list as an ancestor lets you have bullets subordinate to either bulleted or numbered items, and vice-versa:

In your list items you must use <li><p>, not just <li>, because the nested <ul> needs to be inside the <li>, and the smallest enclosing tag always closes at the end of the paragraph (to prevent “pernicious mixed content” wherever possible). This way, the <p> closes, but the <li> stays open for the nested list.

Suppose your document includes a hierarchy of paragraph formats like this:

Body

  Bulleted

    BulletedSub

    BulletedSub

  Bulleted

    BulletedSub

    BulletedSub

    BulletedSub

Body

You would specify the following settings for the bulleted items:

[DITAParaTags]

Bulleted = p

BulletedSub = p

[DITAParents]

Bulleted = $text ul li

BulletedSub = $text $list li ul li

[DITAFirst]

Bulleted = li

BulletedSub = li

Note:  Do not try to use DITA levels to nest lists.



15 Converting to DITA XML > 15.5 Nesting DITA block elements > 15.5.8 Configuring nested lists