XML technologies / DocBook / Block elements / Lists / Definition list (variablelist)

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

The name variablelist is misleading: this list type is generally used for terms and their definitions.

Example: Structure of a definition list (variablelist.xml)

<variablelist>
  <title>Wichtige Dateien</title>
  <varlistentry>
    <term><filename>/etc/fstab</filename></term>
    <listitem>
      <para>...</para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><filename>/etc/hosts</filename></term>
    <listitem>
      <para>...</para>
    </listitem>
  </varlistentry>
</variablelist>

If the terms are too long, the attribute termlength on the element variablelist specifies the length at which they should wrap. This is particularly useful for printed works. You may also insert several term elements after varlistentry. They are normally separated by commas, although other presentations are possible depending on the publishing system.

  

back to top