The following table command directives are used to assemble a custom table:

Command Meaning
<table-start/> begin a new table
<table-column/> declare a table column and an optional column width
<table-head/> begin an optional table header
<table-body/> begin the main body of the table
<table-nextrow/> starts the next table row
<table-cell>...</table-cell> declare the content of a single table cell
<table-emit/> close off and render the finished table

The following definition specifies exactly how the table commands interact. In the structure below, parentheses () are used for grouping, a question mark ? means that the preceding item is optional, and a plus sign + means that the preceding item may occur any number of times (but at least once). The indentation is used to divide the table into its major components, but has no other significance.

   (table-nextrow?, table-cell+, table-nextrow?)+
   (table-nextrow?, table-cell+, table-nextrow?)+

In most respects, the assembly of a custom table commands follows a sequence that is similar to that used when declaring a CALS or HTML table. Each custom table begins with a <table-start/> and one or more <table-column/> declarations. An optional header <table-head/> is followed by a declaration of one or more table header rows. The <table-body/> is followed by one or more table body rows.

Table rows consist of groups of <table-cell>...</table-cell> blocks. Rows begin or end with <table-nextrow/>, except where a new row is generated automatically (see “Automatically generated table rows” for details).

When the content of the table has been assembled, the <table-emit/> command instructs the composition engine to render the table.

Strictly speaking a custom table has no structure, as all of the table assembly commands (except the table-cell block) are declared as empty. Provided that the assembly sequence described above is followed, it is possible for the various parts of the table to be declared by any number of separate element mappings.