12.6.27. Flow Object Classes for Tables

Specification of tabular formatting makes use of the following flow object classes:

12.6.27.1. Table Flow Object Class

A table flow object has a single principal port. The contents of this port shall be either:

If it contains flow objects of class table-column, they shall occur before all flow objects of other classes. A table flow object can only be displayed.

A table has two directions associated with it, a row-progression direction and a column-progression direction. The row-progression direction is equal to the placement direction of the table flow object. The column-progression direction is given by the value of the writing-mode: characteristic of the table flow object. These shall be perpendicular.

A table flow object has the following characteristics:

12.6.27.2. Table-part Flow Object Class

A table-part flow object is allowed only within a table flow object. A table-part flow object has three ports:

The flow objects that are allowed in the ports of a table-part flow object shall be only those explicitly specified herein. Flow objects of class table-column are allowed in the principal port; they shall occur before flow objects of any other class. All ports shall accept flow objects of class table-row and table-cell.

The result of formatting a table-part flow object is a sequence of areas. Each area consists of the content of the header port (unless omitted because of the table-part-omit-middle-header?: characteristic), followed by some portion of the content of the principal port, followed by the content of the footer port (unless omitted because of the table-part-omit-middle-footer?: characteristic). Each row in the principal port occurs exactly once, and the order of the rows shall be preserved. The rows in the header and footer ports shall be replicated for each result area.

All table-parts in a table have the same width.

The following characteristics are applicable:

12.6.27.3. Table-column flow object

A table-column flow object is an atomic flow object that specifies characteristics applicable to table-cells that have the same column and span.

It has the following characteristics:

Any inherited characteristic that is specified on a table-column flow object may be inherited by table-cells (or indirectly by the content of table-cells) as described in “Flow Object Tree Construction”.

If the table-auto-width feature is not enabled, the number of columns in a table-part or in a table that contains no table-parts is determined by the table-column flow objects in its principal port. For every cell in the content, and for every column spanned by that cell, there shall be a table-column flow object whose column-number is equal to the number of that column. If the table-auto-width feature is enabled, then the number of columns is determined automatically from the content of the table.

(table-unit k)

Returns a length-spec that specifies k units of proportional measure. This may be used in the value of the width: characteristic. The value of a unit of proportional measure for a particular table is chosen so that the total width of the columns is equal to the specified width of the table.

NOTE 112: This allows the width of a column to be specified proportionally.

12.6.27.4. Automatic Table-width Computation

This clause applies when the table-auto-width feature is enabled.

The width of a column for which no width is specified shall be at least as great as the maximum of the minimum possible widths of the content of any table-cells that span exactly that column.

NOTE 113: When a table-cell includes a paragraph for which the lines: characteristic has a value of wrap, the minimum possible width of that paragraph is determined in a system-dependent manner. It might, for example, be the length of the longest word.

If a table-cell spans more than one column, then the sum of the widths of the columns that it spans shall be at least as great as the width of the content of the table-cell.

If a length-spec is specified for a column's width, then the column shall be exactly that wide, and that length shall be used as the display-size for any table-cells which span exactly that column.

Other aspects of the width computation method can be controlled with the table-auto-width-method: characteristic.

12.6.27.5. Table-row Flow Object Class

A table-row flow object serves to group table-cells into rows: all table-cells in a table-row start in the same geometric row.

A table-row has a single principal port, which accepts flow objects of class table-cell.

A table-row flow object can only occur as the child of a table-part or table flow object.

When flow objects of class table-cell occur directly in a table-part or table, then cells are grouped into rows using the starts-row?: and ends-row?: characteristics.

12.6.27.6. Table-cell Flow Object Class

A table-cell has a single principal port. It shall accept any flow object that can be displayed. A table-cell flow object shall only occur as the child of a table-row, table-part, or table flow object.

A table-cell has the following characteristics:

NOTE 115: The alignment of the content of a table-cell in the column-progression direction (e.g., horizontal alignment for left-to-right, top-to-bottom text) shall be controlled by the display-alignment: or quadding: characteristics of the content of the table-cell.

12.6.27.7. Table-border Flow Object Class

A table-border flow object is an atomic flow object used to specify the border of a table-cell or of the table as a whole. A table-border flow object is not allowed in the content of any flow object. The following characteristics are applicable:

The width of borders does not affect the width of cells, nor the positioning of the contents of cells, nor the width of the table, nor the size of the area produced by the table. In particular, the width of the table, as specified by the table-width: characteristic on the table, is equal to the sum of the widths of the cells.