6.15. Lists

There are several types of lists you can create using XML. You can have a itemized (bulleted) list, a ordered (numbered) list, or a variable list (presents a term and then a separate paragraph).

There is also a list format for tables and for for creating a list of glossary terms and their definitions.

The sections below will discuss the proper uses for the various list and how to create them.

6.15.1. itemizedlist

An ItemizedList is best used to present information that is important for the reader to know, but that does not need to be in a specific order. It is shorter than a VariableList and presents the information in a very simple way.

To create an ItemizedList (otherwise known as bulleted list), use the following command sequence:

[Note]Note

Notice below that the text for the list item is directly surrounded by the para tags. If you do not do this, you will find extra whitespace in your lists where the text does not line up correctly. This is most noticeable when you have a series of list items that consist of multiple lines of text. This whitespace is not as noticeable in the HTML output as it is in the PDFs.


<itemizedlist> 
  <listitem>
    <para>Getting familiar with the installation program's user interface</para>
  </listitem>

  <listitem>
    <para>Starting the installation program</para> 
  </listitem>

  <listitem>
    <para>Selecting an installation method</para>
  </listitem>
</itemizedlist>

The output looks like:

  • Getting familiar with the installation program's user interface

  • Starting the installation program

  • Selecting an installation method

6.15.2. OrderedList

An orderedlist is best used to present information that is important for the reader to know in a specific order. orderedlists are a good way to convey step-by-step senarios to the audience you are writing for.

To create an orderedlist (numbered list), use the following XML code sequence:

[Note]Note

Notice below that the text for the list item is directly surrounded by the para tags. If you do not do this, you will find extra whitespace in your lists where the text does not line up correctly. This is most noticeable when you have a series of list items that consist of multiple lines of text. This whitespace is not as noticeable in the HTML output as it is in the PDFs.


<orderedlist>
  <listitem>
    <para>Online &mdash; http://www.redhat.com/support/errata; supplies errata
    you can read online, and you can download diskette images
    easily.</para>
  </listitem>
	  
  <listitem>
    <para>Email &mdash; By sending an empty mail message to errata@redhat.com, 
    you will receive an email containing a text listing of the 
    complete errata  of the installation program and related software 
    (if errata exist at  that time).  Also included are URLs to each 
    updated package and diskette  image in the errata. Using these 
    URLs, you can download any necessary  diskette images. Please 
    note: use binary mode when transferring a diskette image.</para> 
  </listitem>
</orderedlist>

The output looks like:

  1. Online — http://www.redhat.com/support/errata; supplies errata you can read online, and you can download diskette images easily.

  2. Email — By sending an empty mail message to errata@redhat.com, you will receive an email containing a text listing of the complete errata of the installation program and related software (if errata exist at that time). Also included are URLs to each updated package and diskette image in the errata. Using these URLs, you can download any necessary diskette images. Please note: use binary mode when transferring a diskette image.

6.15.3. Variablelist

A variablelist best represents a list of terms and definitions or descriptions for those terms.

To create a variablelist, use the following command sequence:

[Note]Note

Notice below that the text for the list item is directly surrounded by the para tags. If you do not do this, you will find extra whitespace in your lists where the text does not line up correctly. This is most noticeable when you have a series of list items that consist of multiple lines of text. This whitespace is not as noticeable in the HTML output as it is in the PDFs.


<variablelist>
  <varlistentry> 
    <term> New Multi-CD Install </term>
    <listitem> 
      <para>As the installation program continues to grow, Red Hat has developed 
      an installation program capable of installing from 
      multiple CD-ROMs.</para>
    </listitem>
  </varlistentry>

 <varlistentry>
   <term>XFree 4.0 </term>
   <listitem>
     <para>Configuration of your X Window System during the installation has 
     never been more thorough. From choosing your monitor and its correct 
     settings, to video card probing, to testing your desired X setup, 
     Xconfigurator will help you set  everything just right.</para>
   </listitem>
 </varlistentry>
</variablelist>

The output looks like:

New Multi-CD Install

As the installation program continues to grow, Red Hat has developed an installation program capable of installing from multiple CD-ROMs.

XFree 4.0

Configuration of your X Window System during the installation has never been more thorough. From choosing your monitor and its correct settings, to video card probing, to testing your desired X setup, Xconfigurator will help you set everything just right.

[Warning]Warning

Do not specify the frame attribute to the table. Doing so breaks PDF production.

6.15.4. Creating a List Within a Table Using Simplelist

A simplelist is an unadorned list of items. simplelists can be inline or arranged in columns.

We use simplelist to add separate paragraphs of text within a table element. A regular list, such as itemizedlist, cannot be embedded within a table.

The XML commands for a table look like:


	  <table id="tb-hwinfo-hostbus">
	    <title>Host Bus Adapter Features and Configuration Requirements</title>
	    
	    <tgroup cols="3">
	      <colspec colnum="1" colname="HostBus" colwidth="33"/>
	      <colspec colnum="2" colname="Features" colwidth="34"/>
	      <colspec colnum="3" colname="Single" colwidth="33"/>
	      
	      <thead>
		<row>
		  <entry>Host Bus Adapter</entry>
		  <entry>Features</entry>
		  <entry>Single-Initiator Configuration</entry>
		</row>
	      </thead>
	      
	      <tbody>
		
		<row>
		  <entry>Adaptec 2940U2W</entry>
		  
		  <entry><simplelist> 
		      <member>Ultra2, wide, LVD.</member>
		      <member>HD68 external connector.</member>
		      <member>One channel, with two bus segments.</member>
		      <member>Set the onboard termination by using the BIOS
			utility.</member>
		      <member>Onboard termination is disabled when the power is
			off.</member>
		    </simplelist></entry>
		  
		  <entry><simplelist>
		      <member>Set the onboard termination to automatic (the
			default).</member>
		      <member>Use the internal SCSI connector for private
			(non-cluster) storage.</member>
		    </simplelist></entry>
		</row>
		
		<row>
		  <entry>Qlogic QLA1080</entry>
		  
		  <entry><simplelist> 
		      <member>Ultra2, wide, LVD</member>
		      <member>VHDCI external connector</member>
		      <member>One channel</member>
		      <member>Set the onboard termination by using the BIOS
			utility.</member>
		      <member>Onboard termination is disabled when the power is off,
			unless jumpers are used to enforce termination.</member>
		    </simplelist></entry>
		  
		  
		  <entry><simplelist> 
		      <member>Set the onboard termination to
			automatic (the default).</member>
		      <member>Use the internal SCSI connector for private
			(non-cluster) storage.</member>
		    </simplelist></entry>
		</row>
		
	      </tbody>
	    </tgroup>
	  </table>

The output looks like:

Host Bus AdapterFeaturesSingle-Initiator Configuration
Adaptec 2940U2W
Ultra2, wide, LVD.
HD68 external connector.
One channel, with two bus segments.
Set the onboard termination by using the BIOS utility.
Onboard termination is disabled when the power is off.
Set the onboard termination to automatic (the default).
Use the internal SCSI connector for private (non-cluster) storage.
Qlogic QLA1080
Ultra2, wide, LVD
VHDCI external connector
One channel
Set the onboard termination by using the BIOS utility.
Onboard termination is disabled when the power is off, unless jumpers are used to enforce termination.
Set the onboard termination to automatic (the default).
Use the internal SCSI connector for private (non-cluster) storage.

Table 6.1. Host Bus Adapter Features and Configuration Requirements

[Note]Note

Notice how the SimpleList tags are used. The <entry> and <simplelist> tags must be aligned beside one another, otherwise you will receive a parsing error.

For each paragraph or list item to be added within a SimpleList, the <member> tag set must be added around that particular text item.

6.15.5. glosslist

Use the glosslist command set to create a list of glossary terms and their definitions.

In XML, an example looks like the following:


	  <glosslist>
	    <glossentry>
	      <glossterm>applet</glossterm>
	      <glossdef>
		<para>A small application, usually a utility or other
	        simple program.</para>
	      </glossdef>
	    </glossentry>

	    <glossentry>
	      <glossterm>architecture</glossterm>
	      <glossdef>
		<para>The design for organization and integration of 
                components within a computer or computer system.</para>
	      </glossdef>
	    </glossentry>

	    <glossentry>
	      <glossterm>archive</glossterm>
	      <glossdef>
		<para>To transfer files into storage for the purpose of 
	        saving space and/or organization.</para>
	      </glossdef>
	    </glossentry>
	  </glosslist>
	  

The output looks like:

applet

A small application, usually a utility or other simple program.

architecture

The design for organization and integration of components within a computer or computer system.

archive

To transfer files into storage for the purpose of saving space and/or organization.