<tgroup> (
Table Group)
Description
Description
This element contains a grid of cells within a CALS table, with a pre-defined number of columns and a set width for each column. The grid may be sub-divided into header, footnote and body rows, but all are preceded by empty elements that specify column widths for each column:
<table>
<tgroup cols="3">
<colspec colnum="1" colname="col-1" colwidth="1*"/>
<colspec colnum="2" colname="col-2" colwidth="2*"/>
<colspec colnum="3" colname="col-3" colwidth="1*"/>
<thead>...</thead>
<tfoot>...</tfoot>
<tbody>...</tbody>
</tgroup>
</table>
A table will contain more than one such grid when the number of columns changes or the column widths change.
Parent Elements
The elements listed below may directly contain this element.
They are "parent" elements. Elements in referenced groups are included, up to two levels of group nesting.
Model Diagram
The DTD model for this element:
--+(sequence)
|
colspec (repeatable)
|
thead (optional) -- (elements)
|
tfoot (optional) -- (elements)
|
tbody -- (elements)
DTD Definition
The DTD contains the following element and attribute definitions
(note that embedded links are to definitions within the DTD page of this guide):
<!ELEMENT tgroup (colspec+, thead?, tfoot?, tbody)>
<!ATTLIST tgroup
cols NMTOKEN #REQUIRED
colsep NMTOKEN #IMPLIED
rowsep NMTOKEN #IMPLIED
align (left | right | center | justify |
char) #IMPLIED
char CDATA #IMPLIED
charoff NMTOKEN #IMPLIED
%a-group-CommonIDAttrs;>
.
Defined in DTD section
Block-level Content : Tables
General Attributes (shared with other elements)
Local Attributes (defined for this element alone)
Attribute:
cols (
Columns)
Description
This required attribute specifies how many columns the grid will contain. There is no equivalent for rows, as the sheer number of
<row> elements determines that factor.
Specification
This attribute is required. It holds a single name token (initial character must be a letter, '_' or ':', and remaining characters must be letters or digits or '_', ':', '-', or '.').
DTD Definition
cols NMTOKEN #REQUIRED
.
Attribute:
colsep (
Column Separators)
Description
This attribute specifies whether or not lines need to be drawn between the columns ("0" means no, "1" means yes). By default, lines should not be drawn. Values larger than "1" should be treated as if it were "1".
Note that a line should not be drawn after entries in the final column. The
frame attribute is used instead.
Specification
This attribute is not required. It holds a single name token (initial character must be a letter, '_' or ':', and remaining characters must be letters or digits or '_', ':', '-', or '.').
DTD Definition
colsep NMTOKEN #IMPLIED
.
Attribute:
rowsep (
Row Separators)
Description
This attribute specifies whether or not lines need to be drawn between the rows ("0" means no, "1" means yes). By default, lines should not be drawn. Values larger than "1" should be treated as if it were "1".
Note that a line should not be drawn beneath entries in the final row. The
frame attribute is used instead.
Specification
This attribute is not required. It holds a single name token (initial character must be a letter, '_' or ':', and remaining characters must be letters or digits or '_', ':', '-', or '.').
DTD Definition
rowsep NMTOKEN #IMPLIED
.
Attribute:
align (
Alignment)
Description
This attribute specifies the default horizontal alignment of text within cells, to be applied unless an override setting is given in a lower-level construct. When the value is "char", the
char and
charoff attributes become significant.
Specification
This attribute is not required. The allowed values are "left", "right", "center", "justify" and "char".
DTD Definition
align (left | right | center | justify |
char) #IMPLIED .
Attribute:
char (
Character)
Description
This attribute holds the character that is deemed to be significant when there is a need to align cells in a column on a particular character. Typically, it holds a full-point or comma. It is only applied when the
align attribute is given the value "char".
Specification
This attribute is not required. It has text content.
DTD Definition
char CDATA #IMPLIED
.
Attribute:
charoff (
Character Offset)
Description
This attribute is used when the
align attribute is given the value "char" to specify the percentage from the left edge of the column that the character specified in the
charoff attribute is to be placed. If this character should appear in the middle of the column, then a value of "50" would be used.
Specification
This attribute is not required. It holds a single name token (initial character must be a letter, '_' or ':', and remaining characters must be letters or digits or '_', ':', '-', or '.').
DTD Definition
charoff NMTOKEN #IMPLIED
.