SPFE Documentation | Collections > EPPO-simple Demos > Labeled items demo
Labeled items demo
The labeled items structure is a construct in which a label is applied to a short piece of text as a heading. It is similar to the definition list construct found in DITA and HTML, except that in EPPO-simple it is not a list. That is, there is no list wrapper around a labeled item or a set of labeled items. This is consistent with the EPPO-simple principle of keeping structures as flat as possible. In the case of labeled items, formatting is generally not affected by the fact that several labeled items appear in sequence. For instance, first or last items in such a sequence do not usually require special formatting. (In the case that they do, a list wrapper could be applied to a set of labeled items at the formatting stage.)
The follow is an example of a labeled item:
- This is the label of a labeled item.
-
This is the item to which the label is applied. The item structure can contain structures from the text-nested group.
The following is the XML code for the labeled item above:
<labeled-item> <label>This is the label of a labeled item.</label> <item> <p>This is the item to which the label is applied. The <xml-element-name>item</xml-element-name> structure can contain structures from the <feature>text-nested group</feature>. </p> </item> </labeled-item>
An alternate to the labeled item is the labeled list, or ll element. The ll element is constructed on the same model as the common ol and ul list types, but rather than a number or a bullet, it introduces the list items with a label. By default, the ll element is limited to a single paragraph.
Here is an example of a labeled list:
Fred - Fred Flintstone.
Wilma - Wilma Flintstone.
Here is the code that produced it:
<ll> <li> <label>Fred</label> <p>Fred Flintstone.</p> </li> <li> <label>Wilma</label> <p>Wilma Flintstone.</p> </li> </ll>