XML technologies / DocBook / Block elements / Tables / Defining headers and footers in CALS tables

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

In a CALS table, create headers and footers with the elements thead and tfoot:

Example: Header and footer of a CALS table

<table>
 <title>Testtabelle</title>
 <tgroup cols="2">
  <thead>
   <row>
     <entry>Kopf-A</entry>
     <entry>Kopf-B</entry>
   </row>
  </thead>
  <tfoot>
   <row>
     <entry>Fuß-A</entry>
     <entry>Fuß-B</entry>
   </row>
  </tfoot>
  <tbody><!-- --></tbody>
 </tgroup>
</table>

Line 3: To create a header or footer, first provide a tgroup element. Specify the number of columns in the attribute cols.
Line 4: A header starts with thead.
Line 5: Mark up each row with a row element. A cell (the intersection of a column and row) is marked with entry.
Line 10: A footer starts with tfoot.
Line 16: The table’s main entries go here, inside the element tbody.

A table can have headers or footers, but they are optional. Both label the respective columns. Footers are less common and are generally used only in long tables to help readers identify columns at the end.

  

back to top