DITA Definition Entries and Dropdowns

Description

Definition Term items are configured via Options as Dropdown -> Start closed.

This works, except that if there is content which occurs after the definition list, it may get included in the last dropdown in the definition list.

Possible Solution

Mark the start/end of definition list entries via @markopen and @markclose in default.wwconfig. Then use the new style names to control dropdown display.

Mark DITA Definition List Entries

This requirement can be accomplished by creating an override to the DITA styles configuration file:

We add a new style rule for ' topic/dlentry ' elements with the @markopen and @markclose attributes:

This will preserve the location of the start/end of the <dlentry> container element.

Fix Dropdown Behavior via Style Designer

Next, we scan our source DITA map an configure styles as follows:

DITA Element

Paragraph Style Name

Changes

<dt>...</dt>

Definition Term

Options -> Dropdown -> Start closed

<dlentry>

Definition List Entry Open

Options -> Generate output -> Disabled

</dlentry>

Definition List Entry Close

Options -> Dropdown -> Break
Properties -> HTML -> Display -> None

This configuration ensures dropdowns are correctly closed out during processing. It also ensures the placeholder paragraph is ignored by the browser when rendered in a browser.

Example Project

The above changes are implemented in the attached project Definition Lists.zip.

DevCenter/Projects/DITA Definition Entries and Dropdowns (last edited 2012-11-14 00:27:18 by BenAllums)