Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: KunenaControllerApplicationDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/kunena/controller/application/display.php on line 21

Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /homepages/13/d380392445/htdocs/Jlive/administrator/components/com_easyblog/includes/adsense/adsense.php on line 138
DocBook XML tables - Macrotone Blogs
By Geoffrey Chapman on Thursday, 29 November 2012
Category: Joomla Hints and Tips

DocBook XML tables


We have been studying  the DocBook DTD and in particular the table specifications.  There are two separate and distinct formats supported, the originals CALS format and the ‘newer’ HTML format since DocBook version 4.3. CALS is an SGML standard developed by the U.S. military, and their set of table tags was one of the first to be developed that included complex features for tables.

Some confusion was encountered since one source claimed that both table formats could not be used in the same document, whilst another source claimed that the two forms cannot be mixed within  the same definition, which makes more sense.

Later, because of widespread familiarity with HTML tables, DocBook added HTML table elements. Now you can use tr and td instead of row and entry in a table.  They cannot be mixed within one table. Also, the content of each table cell has to be valid DocBook, so you cannot usually just cut and paste an HTML table into your DocBook document. But the DTD does permit a document to contain both CALS tables and HTML tables. The tgroup element is the distinguishing characteristic between them. A CALS table requires a tgroup, and an HTML table does not permit one.

The formats are sufficiently similar that it is worth mentioning them here.  The following table neatly summarises the differences.

Purpose HTML Element CALS Element Comments
Container for table elements. table, informal­table table, informal­table The CALS table element requires a title, an HTML table element requires a caption. An informaltable accepts neither.
Table title caption title Use informaltable for an HTML table without a caption.
Wrapper for table section Not available tgroup HTML tables do not support subsections of a table with different column specifications. CALS requires at least one tgroup.
Column specifications col, colgroup colspec, spanspec The CALS spanspec element specifies horizontal spanning (joining) of cells.
Wrapper for header rows thead thead  
Wrapper for body rows tbody tbody  
Wrapper for footer rows tfoot tfoot In both HTML and CALS, tfoot must appear before tbody.
Row tr row All open tr tags must have a closing tag.
Cell td, th entry All open td tags must have a closing tag.
Nested table informaltable inside a td entrytbl inside a row Nested HTML tables permitted since version 4.4 of the DTD.


The table format is not what I would call very pretty and we are investigating how one can use different CSS classes to make them ‘prettier’.

Leave Comments