Next Up Previous Contents
Next: 4.9 Text markup
Up: 4 The structure of the document
Previous: 4.7 Figures
[ID index][Keyword index]

4.8 Tables

Includes caption, colspec, entry, row, table, tabular, tbody, tgroup, thead.

The table element contains a tabular element. The distinction between the two is that the tabular is the object which contains data lined up in columns, whilst the table is an object which might float from its declared position, which has a caption, and which can be referred to from elsewhere.

The tabular element will most commonly be used within a table element, but it is also permissible within ordinary paragraphs. Note, however, that the tabular element does not necessarily have a linebreak before and after it in this case. If you want the tabular to go on a line by itself (which will usually be the case), you should include it within a blockquote element.

The Starlink DTDs use the `Oasis Exchange Table Model' (OASIS document OASIS TR9503:1995) as the basis for their tables. Even though it is only a portable subset of a more elaborate standard (the industry-standard CALS table model), there is more in the table model than has yet been implemented in the Starlink application. You may use in your documents all of the elements and attributes in the Oasis model, but some of the lesser-used attributes are not supported.

The support for Oasis table attributes is as shown in Table 4.

ElementSupportedUnsupported
tabularcolsep, frame, rowseppgwide
tgroupalign, cols, colsep, rowsep(none)
thead(none)valign
tbody(none)valign
colspecalign, colname, colnum, colsep, rowsep, colwidth char, charoff
rowrowsepvalign
entrycolname, namest, nameend align, char, charoff, colsep, morerows, rowsep, valign

Table 4

Support for Oasis table attributes in Starlink DTDs

You lay out a table as follows:

<table id="table.entities">
<caption>Entities predefined in the Starlink general DTD.</caption>
<tabular>
<tgroup cols="3">
<colspec colnum=2 align=center>
<thead>
<row><entry>Entity reference<entry>Replacement<entry>Description
<tbody>
<row><entry><code/&amp;copy;><entry>&copy<entry>Copyright symbol
<row><entry><code/&amp;amp;><entry><code/&amp><entry>ampersand
</tabular>
</table>
You specify an ID for the table, and optionally also the `export' attribute, in the table start tag. A tabular can have a number of groups of rows, contained within tgroup elements, and it is in the start-tag of the tgroup element that you specify the number of columns in rows in that group. A group of rows consists of an optional group of heading rows, followed by one or more groups of body rows. Each row consists of a sequence of entry elements.

For more detailed documentation on the tabular element, see Appendix C.1.70 and the documentation of the other tabular elements. For alternative documentation, including documentation of the currently unsupported features, see the Oasis document referred to above.


Next Up Previous Contents
Next: 4.9 Text markup
Up: 4 The structure of the document
Previous: 4.7 Figures
[ID index][Keyword index]
The Starlink SGML Set
Starlink System Note 70
Norman Gray, Mark Taylor
21 April 1999. Release DR-0.7-13. Last updated 24 August 2001