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.
The DITA table is based on the OASIS Exchange Table Model, augmented with DITA attributes that 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. See simpletable for a simplified table model that can be specialized to represent more regular relationships of data.
In DITA tables, in place of the expanse attribute used by other DITA elements, the pgwide attribute is used in order to conform to the OASIS Exchange Table Model. This attribute has a similar semantic (1=page width; 0=resize to galley or column).
Doctype | Content model |
---|---|
topic, map, concept, ditabase, glossary, glossentry, glossgroup, reference, task, bookmap, classifyMap, subjectScheme, machineryTask, learningAssessment, learningBookmap, learningContent, learningMap, learningOverview, learningPlan, learningSummary | ( ( (title) (optional) then (desc) (optional) ) (optional) then (tgroup) (one or more) ) |
<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 |
Name | Description | Data Type | Default Value | Required? |
---|---|---|---|---|
frame | Specifies which portion of a border should surround the
element. Allowable values are:
Some DITA processors or output formats may not be able to support all values. |
(top | bottom | topbot | all | sides | none | -dita-use-conref-target) | #IMPLIED | No |
colsep | Column separator. A value of 0 indicates no separators; 1 indicates separators. | NMTOKEN | #IMPLIED | No |
rowsep | Row separator. A value of 0 indicates no separators; 1 indicates separators. | NMTOKEN | #IMPLIED | No |
pgwide | Determines the horizontal placement of the element.
Supported values are 1 and 0, although these are not mandated by the DTD or
Schema.
For print-oriented display, the value "1" places the element on the left page margin; "0" aligns the element with the left margin of the current text line and takes indention into account. For XHTML, the table surrounds the table data. Either value sets the table width to 100%. |
NMTOKEN | #IMPLIED | 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:
Note that this attribute is not part of the OASIS Exchange Table model upon which DITA tables are based; because of this, some DITA processors or output formats may not be able to support all values. |
(firstCol | norowheader| -dita-use-conref-target) | #IMPLIED | No |
scale | Specifies a percentage, selected from an enumerated list,
that is used to resize fonts in relation to the normal text size.
This attribute is primarily useful for print-oriented
display.
The scale attribute provides an acknowledged style-based property directly on DITA elements. For the table and fig elements, the intent of the property is to allow authors to adjust font sizes on the content of the containing element, primarily for print accomodation. An image in these contexts is to be scaled only by its own direct scale property. If not specifically scaled, such an image is unchanged by the scale property of its parent table or fig. Some DITA processors or output formats may not be able to support all values. |
(50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 140 | 160 | 180 | 200 | -dita-use-conref-target) | #IMPLIED | No |
univ-atts attribute group (includes select-atts, id-atts, and localization-atts groups) | A set of related attributes, described in univ-atts attribute group | |||
global-atts attribute group (xtrf, xtrc) | A set of related attributes, described in global-atts attribute group | |||
class, outputclass | Common attributes described in Other common DITA attributes |
Return to main page.
OASIS DITA Version 1.2 -- OASIS Standard, 1 December 2010
Copyright © OASIS Open 2005, 2010. All Rights Reserved.