Rules Editor Home | Documentation Home | Stilo
Guide to
Migrate 5.0.0 Rules Editor
Stilo
Definition lists
Syntax
p.dl.entry
p.dl.head
p.dl.term(level)
level
nesting level for the list, any integer
p.dl.definition(level)
level
nesting level for the list, any integer
Purpose

A definition list is a list of terms and corresponding definitions.

Here is a sample list with a header:

Term - Definition IO Input Output FIFO First In First Out LIFO Last In First Out SQL Structured Query Language TTY Teletype

Since the terms and definitions are in different paragraphs, you will need to use the annotations p.dl.term() and p.dl.definition() to mark up the paragraphs. You can also use the annotation p.dl.head for the header line.

This is what your rules may look like. Rules for paragraph-level definition list terms and definitions Rules for paragraph-level definition list header

Your output may look like this.

<dl> <dlhead> <dthd>Term - Definition</dthd> </dlhead> <dlentry> <dt>IO</dt> <dd><p>Input Output</p></dd> </dlentry> <dlentry> <dt>FIFO</dt> <dd><p>First In First Out</p></dd> </dlentry> <dlentry> <dt>LIFO</dt> <dd><p>Last In First Out</p></dd> </dlentry> <dlentry> <dt>SQL</dt> <dd><p>Structured Query Language</p></dd> </dlentry> <dlentry> <dt>TTY</dt> <dd><p>Teletype</p></dd> </dlentry> </dl>

Definition lists can also be nested, as in this example below.

Computer peripherals Electronic equipment connected, usually by cable, to the CPU of a computer. Such devices include: Keyboard A set of keys used to input text and numbers into a computer. Mouse A hand-controlled pointing device that detects two-dimensional motion Monitor A screen on which the computer’s output is displayed Touchscreen A touch-sensitive screen that can act as both input and output for a system CPU Central Processing Unit

This is what your rules may look like. Rules for nested definition list

This is what your output may look like.

<dl> <dlentry> <dt>Computer peripherals</dt> <dd><p>Electronic equipment connected, usually by cable, to the CPU of a computer. Such devices include: </p> <dl> <dlentry> <dt>Keyboard</dt> <dd><p>A set of keys used to input text and numbers into a computer.</p></dd> </dlentry> <dlentry> <dt>Mouse</dt> <dd><p>A hand-controlled pointing device that detects two-dimensional motion</p></dd> </dlentry> <dlentry> <dt>Monitor</dt> <dd><p>A screen on which the computer’s output is displayed</p></dd> </dlentry> <dlentry> <dt>Touchscreen</dt> <dd><p>A touch-sensitive screen that can act as both input and output for a system</p></dd> </dlentry> </dl> </dd> </dlentry> <dlentry> <dt>CPU</dt> <dd><p>Central Processing Unit</p></dd> </dlentry> </dl>