table

table — A formal table in a document.

Synopsis

table ::=

Attributes

Common attributes and common linking attributes.

Additional attributes:

  • colsep (enumeration)
    • “0”
    • “1”
  • floatstyle
  • frame (enumeration)
    • “all”
    • “bottom”
    • “none”
    • “sides”
    • “top”
    • “topbot”
  • label
  • orient (enumeration)
    • “land”
    • “port”
  • pgwide (enumeration)
    • “0”
    • “1”
  • rowheader (enumeration)
    • “firstcol”
    • “headers”
    • “norowheader”
  • rowsep (enumeration)
    • “0”
    • “1”
  • shortentry (enumeration)
    • “0”
    • “1”
  • tabstyle
  • tocentry (enumeration)
    • “0”
    • “1”
  • type

Additional Constraints

  • example must not occur among the children or descendants of table
  • figure must not occur among the children or descendants of table
  • equation must not occur among the children or descendants of table

Description

This table element identifies a formal table (one with a title). DocBook allows either CALS or HTML tables, both of which describe tables geometrically using rows, columns, and cells.

Tables may include column headers and footers with thead and tfoot, respectively. Use the rowheader attribute to identify 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 calsdtd.

Attributes

Common attributes and common linking attributes.

any attribute

Any attribute in any other explicit namespace

colsep

Specifies the presence or absence of the column separator

Enumerated values:
“0”

No column separator rule.

“1”

Provide a column separator rule on the right

floatstyle

Specifies style information to be used when rendering the float

frame

Specifies how the table is to be framed. Note that there is no way to obtain a border on only the starting edge (left, in left-to-right writing systems) of the table.

Enumerated values:
“all”

Frame all four sides of the table. In some environments with limited control over table border formatting, such as HTML, this may imply additional borders.

“bottom”

Frame only the bottom of the table.

“none”

Place 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.

“sides”

Frame the left and right sides of the table.

“top”

Frame the top of the table.

“topbot”

Frame the top and bottom of the table.

label

Specifies an identifying string for presentation purposes

orient

Specifies the orientation of the table

Enumerated values:
“land”

90 degrees counter-clockwise from the rest of the text flow.

“port”

The same orientation as the rest of the text flow.

pgwide

Indicates if the element is rendered across the column or the page

Enumerated values:
“0”

The element should be rendered in the current text flow (with the flow column width).

“1”

The element should be rendered across the full text page.

rowheader

Indicates whether or not the entries in the first column should be considered row headers

Enumerated values:
“firstcol”

Indicates that entries in the first column of the table are functionally row headers (analogous to the way that a thead provides column headers).

“headers”

Indicates that row headers are identified by use of the headers attribute on entries in the table.

“norowheader”

Indicates that entries in the first column have no special significance with respect to column headers.

rowsep

Specifies the presence or absence of the row separator

Enumerated values:
“0”

No row separator rule.

“1”

Provide a row separator rule below

shortentry

Indicates if the short or long title should be used in a List of Tables

Enumerated values:
“0”

Indicates that the full title should be used.

“1”

Indicates that the short short title (titleabbrev) should be used.

tabstyle

Specifies the table style

tocentry

Indicates if the table should appear in a List of Tables

Enumerated values:
“0”

Indicates that the table should not occur in the List of Tables.

“1”

Indicates that the table should appear in the List of Tables.

type

Identifies the type of table

Parents

These elements contain table: abstract, acknowledgements, answer, appendix, article, bibliodiv, bibliography, bibliolist, blockquote, callout, calloutlist, caption, caution, chapter, colophon, danger, dedication, dialogue, drama, entry, example, figure, footnote, formalgroup, glossary, glossdef, glossdiv, glosslist, important, index, informalexample, informalfigure, itemizedlist, legalnotice, linegroup, listitem, meta (db.meta.content), note, orderedlist, para, partintro, poetry, preface, procedure, qandadiv, qandaset, question, result, revdescription, section, setindex, sidebar, simplesect, step, taskprerequisites, taskrelated, tasksummary, textobject, tip, toc, variablelist, warning.

Children

The following elements occur in table: alt, caption, indexterm (db.indexterm.endofrange), indexterm (db.indexterm.singular), indexterm (db.indexterm.startofrange), info (db.titleforbidden.info), info (db.titleonlyreq.info), mediaobject, textobject, tgroup, title, titleabbrev.

See Also

Related elements: colspec, entry, entrytbl, equation, example, figure, informalequation, informalexample, informalfigure, informaltable, row, spanspec, tbody, tfoot, tgroup, thead.

Examples

 1 |<article xmlns='http://docbook.org/ns/docbook'>
   |<title>Example table</title>
   | 
   |<table xml:id="ex.calstable" frame='all'>
 5 |<title>Sample CALS Table</title>
   |<tgroup cols='5' align='left' colsep='1' rowsep='1'>
   |<colspec colname='c1'/>
   |<colspec colname='c2'/>
   |<colspec colname='c3'/>
10 |<colspec colnum='5' colname='c5'/>
   |<thead>
   |<row>
   |  <entry namest="c1" nameend="c2" align="center">Horizontal Span</entry>
   |  <entry>a3</entry>
15 |  <entry>a4</entry>
   |  <entry>a5</entry>
   |</row>
   |</thead>
   |<tfoot>
20 |<row>
   |  <entry>f1</entry>
   |  <entry>f2</entry>
   |  <entry>f3</entry>
   |  <entry>f4</entry>
25 |  <entry>f5</entry>
   |</row>
   |</tfoot>
   |<tbody>
   |<row>
30 |  <entry>b1</entry>
   |  <entry>b2</entry>
   |  <entry>b3</entry>
   |  <entry>b4</entry>
   |  <entry morerows='1' valign='middle'><para>Vertical Span</para></entry>
35 |</row>
   |<row>
   |  <entry>c1</entry>
   |  <entry namest="c2" nameend="c3" align='center' morerows='1' valign='bottom'>Span Both</entry>
   |  <entry>c4</entry>
40 |</row>
   |<row>
   |  <entry>d1</entry>
   |  <entry>d4</entry>
   |  <entry>d5</entry>
45 |</row>
   |</tbody>
   |</tgroup>
   |</table>
   | 
50 |</article>
Table 1Sample CALS Table
Horizontal Spana3a4a5
f1f2f3f4f5
b1b2b3b4

Vertical Span

c1Span Bothc4
d1d4d5