table
table — A formal table in a document
Synopsis
Content Model
table ::=
(((blockinfo?,
(title,titleabbrev?),
(indexterm)*,
textobject*,
(graphic+|mediaobject+|tgroup+))|
(caption,
(col*|colgroup*),
thead?,tfoot?,
(tbody+|tr+))))
Attributes
Name | Type | Default | ||||||||||||||||
rowsep | CDATA | None | ||||||||||||||||
ondblclick | CDATA | None | ||||||||||||||||
floatstyle | CDATA | None | ||||||||||||||||
onkeydown | CDATA | None | ||||||||||||||||
onkeyup | CDATA | None | ||||||||||||||||
onmouseup | CDATA | None | ||||||||||||||||
onmouseover | CDATA | None | ||||||||||||||||
align |
| None | ||||||||||||||||
pgwide | CDATA | None | ||||||||||||||||
orient |
| None | ||||||||||||||||
onkeypress | CDATA | None | ||||||||||||||||
onmousedown | CDATA | None | ||||||||||||||||
onclick | CDATA | None | ||||||||||||||||
title | CDATA | None | ||||||||||||||||
class | CDATA | None | ||||||||||||||||
label | CDATA | None | ||||||||||||||||
width | CDATA | None | ||||||||||||||||
frame |
| None | ||||||||||||||||
rules | CDATA | None | ||||||||||||||||
summary | CDATA | None | ||||||||||||||||
bgcolor | CDATA | None | ||||||||||||||||
tabstyle | CDATA | None | ||||||||||||||||
cellspacing | CDATA | None | ||||||||||||||||
colsep | CDATA | None | ||||||||||||||||
shortentry | CDATA | None | ||||||||||||||||
onmouseout | CDATA | None | ||||||||||||||||
onmousemove | CDATA | None | ||||||||||||||||
style | CDATA | None | ||||||||||||||||
xml:lang | NMTOKEN | None | ||||||||||||||||
border | CDATA | None | ||||||||||||||||
rowheader |
| None | ||||||||||||||||
cellpadding | CDATA | None | ||||||||||||||||
tocentry | CDATA | None |
Description
The Table element identifies a formal table. DocBook uses the CALS table model, which describes tables geometrically using rows, columns, and cells.
Tables may include column headers and footers, but there is no provision for row headers.
Processing expectations
Formatted as a displayed block. This element is expected to obey the semantics of the CALS Table Model Document Type Definition, as specified by OASIS Technical Memorandum TM 9502:1995 .
Future Changes
The OASIS Exchange Table Model will replace the full OASIS Table Model.
Parents
These elements contain table: answer, appendix, article, bibliodiv, bibliography, blockquote, callout, caution, chapter, constraintdef, glossary, glossdef, glossdiv, important, index, listitem, msgexplan, msgtext, note, para, partintro, preface, procedure, qandadiv, qandaset, question, refsect1, refsect2, refsect3, refsection, refsynopsisdiv, revdescription, sect1, sect2, sect3, sect4, sect5, section, setindex, sidebar, simplesect, step, taskprerequisites, taskrelated, tasksummary, td, th, tip, warning.
CALS Attributes
colsep
If
ColSephas the value 1 (true), then a rule will be drawn to the right of all columns in this table. A value of 0 (false) suppresses the rule. The rule to the right of the last column in the table is controlled by theFrameattribute, not theColSep.frame
Framespecifies how the table is to be framed:Value
Meaning
allFrame all four sides of the table. In some environments with limited control over table border formatting, such as HTML, this may imply additional borders.
bottomFrame only the bottom of the table.
nonePlace no border on the table. In some environments with limited control over table border formatting, such as HTML, this may disable other borders as well.
sidesFrame the left and right sides of the table.
topFrame the top of the table.
topbotFrame the top and bottom of the table.
There is no way to obtain a border on only the starting edge (left, in left-to-right writing systems) of the table.
label
Labelspecifies an identifying string for presentation purposes.Generally, an explicit
Labelattribute is used only if the processing system is incapable of generating the label automatically. If present, theLabelis normative; it will used even if the processing system is capable of automatic labelling.orient
Orientspecifies the orientation of theTable. An orientation ofPortis the “upright”, the same orientation as the rest of the text flow. An orientation ofLandis 90 degrees counterclockwise from the upright orientation.pgwide
If
Pgwidehas the value 0 (false), then theTableis rendered in the current text flow (with flow column width). A value of 1 (true) specifies that the table should be rendered across the full text page.rowsep
If
RowSephas the value 1 (true), then a rule will be drawn below all the rows in theTable(unless other, interior elements, suppress some or all of the rules). A value of 0 (false) suppresses the rule. The rule below the last row in the table is controlled by theFrameattribute and theRowSepof the last row is ignored.shortentry
If
ShortEntryhas the value 1 (true), then theTable'sTitleAbbrevwill be used in theLoT,Index, etc. A value of 0 (false) indicates that the fullTitleshould be used in those places.tabstyle
TabStyleholds the name of a table style defined in a stylesheet (e.g., a FOSI) that will be used to process this document.tocentry
If
ToCEntryhas the value 1 (true), then theTablewill appear in a generated List of Tables. The default value of 0 (false) indicates that it will not.
HTML Attributes
This element has the HTML event attributes.
align
TBD.
bgcolor
TBD.
border
TBD.
cellpadding
TBD.
cellspacing
TBD.
class
TBD.
frame
TBD.
label
TBD.
rules
Controls the rules used inside the table. The legal values are “none”, “groups”, “rows”, “cols”, and “all”. The DTD does not enforce this constraint because it introduces a conflict in attribute values that violates an SGML constraint.
shortentry
TBD.
summary
TBD.
tabstyle
TBD.
title
TBD.
See Also
colspec, entry, entrytbl, equation, example, figure, informalequation, informalexample, informalfigure, informaltable, row, spanspec, tbody, tfoot, tgroup, thead.
Examples
<!DOCTYPE table PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<table frame='all'><title>Sample Table</title>
<tgroup cols='5' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'/>
<colspec colname='c2'/>
<colspec colname='c3'/>
<colspec colnum='5' colname='c5'/>
<thead>
<row>
<entry namest="c1" nameend="c2" align="center">Horizontal Span</entry>
<entry>a3</entry>
<entry>a4</entry>
<entry>a5</entry>
</row>
</thead>
<tfoot>
<row>
<entry>f1</entry>
<entry>f2</entry>
<entry>f3</entry>
<entry>f4</entry>
<entry>f5</entry>
</row>
</tfoot>
<tbody>
<row>
<entry>b1</entry>
<entry>b2</entry>
<entry>b3</entry>
<entry>b4</entry>
<entry morerows='1' valign='middle'><para> <!-- Pernicous Mixed Content -->
Vertical Span</para></entry>
</row>
<row>
<entry>c1</entry>
<entry namest="c2" nameend="c3" align='center' morerows='1' valign='bottom'>Span Both</entry>
<entry>c4</entry>
</row>
<row>
<entry>d1</entry>
<entry>d4</entry>
<entry>d5</entry>
</row>
</tbody>
</tgroup>
</table>