The <table> element organizes arbitrarily complex relationships of tabular information. This standard table markup allows column or row spanning and table captions or descriptions. An optional title allowed inside the table element provides a caption to describe the table. See simpletable for a simplified table model that can be specialized to represent more regular relationships of data.
The DITA table is based on the OASIS Exchange Table Model, augmented with DITA attributes which enable it for specialization, conref, and other DITA processing. In addition, the table includes a desc element, which enables table description that is parallel with figure description.
In DITA tables, in place of the expanse attribute used by other DITA elements, the pgwide attribute is used instead, to conform with the OASIS Exchange Table Model. This attribute has a similar semantic (1=page width; 0=resize to galley or column).
Name | Description | Data Type | Default Value | Required? |
---|---|---|---|---|
scale, frame | Described at %display-atts; | parameter entity | PE not applicable | Not applicable |
pgwide | Determines the horizontal placement of the element. Supported values are 1 for page width, or 0 for resize to galley or column. | (0 | 1) | #IMPLIED | No |
colsep | Column separator. A value of 0 indicates no separators; 1 indicates separators. | NMTOKEN | "0" | No |
rowsep | Row separator. A value of 0 indicates no separators; 1 indicates separators. | NMTOKEN | "0" | No |
rowheader | This attribute specifies whether the content of the first column
in a table contains row headings. In the same way that a column header introduces
a table column, the row header introduces the table row. This attribute makes
tables whose first column contains row headings more readable on output. Allowable
values are:
|
(firstCol | norowheader) | #IMPLIED | No |
%univ-atts; (%select-atts;, %id-atts;, translate, xml:lang) | A set of related attributes, described at %univ-atts; | parameter entity | PE not applicable | Not applicable |
%global-atts; (xtrf, xtrc) | A set of related attributes, described at %global-atts; | parameter entity | PE not applicable | Not applicable |
class, outputclass | Common attributes described in Other common DITA attributes |
<table> <tgroup cols="2"> <colspec colname="COLSPEC0" colwidth="121*"/> <colspec colname="COLSPEC1" colwidth="76*"/> <thead> <row> <entry colname="COLSPEC0" valign="top">Animal</entry> <entry colname="COLSPEC1" valign="top">Gestation</entry> </row> </thead> <tbody> <row> <entry>Elephant (African and Asian)</entry> <entry>19-22 months</entry> </row> <row> <entry>Giraffe</entry> <entry>15 months</entry> </row> <row> <entry>Rhinoceros</entry> <entry>14-16 months</entry> </row> <row> <entry>Hippopotamus</entry> <entry>7 1/2 months</entry> </row> </tbody> </tgroup> </table>
Animal | Gestation |
---|---|
Elephant (African and Asian) | 19-22 months |
Giraffe | 15 months |
Rhinoceros | 14-16 months |
Hippopotamus | 7 1/2 months |
OASIS DITA Language Specification v1.0 -- 09 May 2005
Copyright (c) OASIS Open 2005. All Rights Reserved.