DAISY—Structure Guidelines: Elements, Block Elements, Information Object Lists

DAISY—Structure Guidelines: Elements, Block Elements, Information Object Lists

Information Object

Lists

Definition

A list is a sequence of two or more items. For markup purposes, there are three types of lists:

  • Ordered lists (type=“ol”)—where list items are numbered or lettered. Such lists are most often used for procedures (e.g., a recipe) or sequential lists (e.g., an agenda).
  • Unordered lists (type=“ul”)—where list items are un-numbered and usually marked with a bullet or other typographical device.
  • Pre-formatted lists (type=“pl”)—where no enumeration or bullets are added by the display agent. Bullets or visuals of the producer’s choice may be added to the list items.

In addition, lists can also be classified as:

  • Definition lists—List items generally consist of term followed by its definition
  • Nested lists—a list item can also contain another list within it, which may in turn hold another list inside it, and so forth. Such a series of lists is said to be nested.

Markup

Ordered and unordered lists are created using <list> tags. When a list contains a heading, the heading should be included in the list and marked with the <hd> tag. Individual list items in unordered or ordered lists are indicated with the <li> tag. If list items consist of two or more discrete segments that should be distinguished, those segments should be marked with the <lic> (“list item component”) tag. A common example of the use of <lic> is in a table of contents to separately mark each entry and its corresponding page number. The <lic> tag should only be used when there are two or more segments in each list item. However, when there are more than two segments to each list item, consider using the <table> tag instead. See Tables: Information Object: Tables If the information presented contains nesting, this is generally an indication that it should be marked as a list rather than a table.

Definition lists are created using <dl> tags. In addition, definition lists require the <dt> tag to indicate the term being defined, and the <dd> tag to mark the definition.

The “type” attribute in <list> is required.

Pre-formatted lists—<list type=”pl”> No numbering nor bullets are added for display purposes.

Values for the “enum” attribute in <list> for ordered lists have changed:

enum=’1′: integer

enum=’a’: lowercase

enum=’A’: uppercase

enum=’i’: lowercase Roman

enum=’I’: uppercase Roman

The “bullet” attribute of <list> has been removed.

The “start” attribute of <list> indicates the first numeric starting point for the list. The default value is 1. A start value is useful when a list is closed, other elements are presented and then the list is reopened.

Syntax

<list type="..">

<hd>...</hd>

<prodnote>...</prodnote>

<li>

<lic>...</lic>

<lic>...</lic>

</li>

<pagenum>...</pagenum>

<li>

<lic>...</lic>

<lic>...</lic>

</li>

</list>

<dl>

<dt>...</dt>

<dd>...</dd>

</dl>

Example 1: Ordered list

<list type="ol" enum="1" class="steps">

<li>peel fruit.</li>

<li>cut fruit in bite sized pieces.</li>

<li>sprinkle fruit with sugar and lime juice to taste.</li>

<li>stir salad.</li>

<li>chill for one hour.</li>

</list>

Example 2: Unordered list

<list type="ul" class="ingredients">

<li>mango</li>

<li>lychee</li>

<li>carambola</li>

<li>rambutan</li>

<li>sugar</li>

<li>lime juice</li>

</list>

Example 3: Nested pre-formatted lists, showing use of <hd> tag

<list type="pl">

<hd>Tropical Fruit</hd>

<li>well-known tropical fruit

<list type="pl">

<li>* pineapple </li>

<li>* papaya</li>

</list></li>

<li>exotic tropical fruit

<list type="pl">

<li>* rambutan </li>

<li>* mangosteen</li>

</list></li>

</list>

Example 4: Definition List

<dl>

<dt>mango</dt>

<dd>tropical fruit with sweet golden flesh</dd>

<dt>lychee</dt>

<dd>tropical fruit with deep red leathery skin and clear white flesh</dd>

<dt>carambola</dt>

<dd>star shaped tropical fruit with tart lemon-pineapple flavour</dd>

<dt>rambutan</dt>

<dd>egg-shaped tropical fruit similar to lychees with leathery skin covered in soft red hairs</dd>

</dl>

See Major Structural Elements: Information Object: Table of Contents  for an example of nested list markup using the <lic> tag.

Tags: DAISY