6.24. table

The following is an example of creating a table.

<table id="tb-mockup-before-begin">
   This tells XML that you will be creating a table
             and the ID name is "tb-mockup-before-begin."

<title>Available Features of GNOME and KDE</title>

<tgroup cols="3">
    This tells XML that you are creating a table
              with three columns.

<colspec colnum="1" colname="Features" colwidth="3"/>
    colspec says that you are giving information
    about the column to XML colnum="1"
    says that you are giving specifications for the first column.
    
    colname="Features" says that the title for this
    column will be "Features."
    
    colwidth="3" specifies the width of the
    column. This can be more tricky: such as two columns with 
    widths of 1 and 2,the 1 is one-half the width of the 2, in 
    respect to the page size. But, what if you need the 1 to be a 
    little more than half of the 2, using a larger number ratio, 
    such as 10 to 20 would accomplish this. You could then change the
    10 to an 11 or a 12 to make it a little more than half of the 
    second column of 20. In no value is given, a value of 1 is 
	  assumed.

<colspec colnum="2" colname="GNOME" colwidth="2"/>
<colspec colnum="3" colname="KDE" colwidth="2"/>

<thead>
    Contains one or more table row elements.

<row> 
   Contains one or more table cell (entry) elements.

<entry>Features</entry>
   Table cell element, one of several in a row element, defining
   columns within the row.

<entry>GNOME</entry> 
<entry>KDE</entry>
</row> 
</thead> 

<tbody> 
   Contains one or more row elements, for the main text 
   of the table.

<row> 
<entry>highly configurable</entry> 
<entry>yes</entry> 
<entry>yes</entry> 
</row> 
<row> 
<entry>multiple window managers </entry>
<entry>yes</entry> 
<entry>yes</entry> 
</row> 
<row> 
<entry>Internet applications</entry> 
<entry>yes </entry> 
<entry>yes </entry> 
</row> 
</tbody> 
</tgroup> 
</table> 
Features GNOMEKDE
highly configurableyesyes
multiple window managers yesyes
Internet applicationsyes yes

Table 6.2. Available Features of GNOME and KDE

6.24.1. Creating a List Within a Table

Creating a list within a table can be a difficult task. It requires strict formatting and a set of commands that are not available for command completion in Emacs.

The tags you will need to use are <simplelist> and <member>.

The following example will show you the proper formatting for creating a list within a table.


<table id="tb-hardware-powerswitch">
  <title>Power Switch Hardware Table</title>
    <tgroup cols="4">
      <colspec colnum="1" colname="Hardware" colwidth="2"/>
      <colspec colnum="2" colname="Quantity" colwidth="2"/>
      <colspec colnum="3" colname="Description" colwidth="6"/> 
      <colspec colnum="4" colname="Required" colwidth="2"/>

       <thead>
	 <row>
           <entry>Hardware</entry>
	   <entry>Quantity</entry>
           <entry>Description</entry>
	   <entry>Required</entry>
	 </row>
       </thead>
	    
       <tbody>
	      
	<row>
          <entry>Serial power switches</entry>

	  <entry>Two</entry>

	  <entry><simplelist> <member>Power switches enable each cluster system
	   to power-cycle the other cluster system. Note that clusters are
	   configured with either serial or network attached power switches and
	   not both.</member>
		      
               <member>The following serial attached power switch has been
	       fully tested:</member>

               <member>RPS-10 (model M/HD in the US, and model M/EC in
	       Europe) </member>

               <member>Latent support is provided for the following serial
	       attached power switch.  This switch has not yet been fully
               tested:</member>
		  
	       <member>APC Serial On/Off Switch (partAP9211), <ulink
               url="http://www.apc.com/">http://www.apc.com/</ulink></member>
               </simplelist></entry>

           <entry>Strongly recommended for data integrity under all failure
	   conditions</entry>

	 </row>
     </tbody>
  </tgroup>
</table>

Notice how the <simplelist> tag must be beside the <entry> tag? If you do not format this properly, it will not parse cleanly.

The above example will look like the following:

HardwareQuantityDescriptionRequired
Serial power switchesTwo
Power switches enable each cluster system to power-cycle the other cluster system. Note that clusters are configured with either serial or network attached power switches and not both.
The following serial attached power switch has been fully tested:
RPS-10 (model M/HD in the US, and model M/EC in Europe)
Latent support is provided for the following serial attached power switch. This switch has not yet been fully tested:
APC Serial On/Off Switch (partAP9211), http://www.apc.com/
Strongly recommended for data integrity under all failure conditions

Table 6.3. Power Switch Hardware Table