The syntax for creating a table in XSL-FO is as follows.
The fo:table element contains the whole table. Common attributes include table-layout (fixed, auto, or inherit) and attributes controlling the borders (e.g, border-width) and background (e.g, background-color) of the table.
The fo:table-column elements are used to set the width of the column. The key attribute is column-width. The fo:table-column elements are the first children of the fo:table element and there should be one fo:table-column element for each column in the table.
fo:table-header, fo:table-body, fo:table-footer
The table is vertically divided into a fo:table-header, fo:table-body, and fo:table-footer. Only the fo:table-body is required. These elements are then divided into rows with the fo:table-row element.
The fo:table-row element is divided into one or more cells with fo:table-cell elements. The total number of cells in each row should equal the number of fo:table-column elements in the table, though cells can span columns, in which case they count for however many columns they span.
The fo:table-cell element contains the content of the cell, which is displayed in the output.
Let's look at an example.