Long tables

Long tables are generally not a problem in DocBook XSL. In HTML output, in which web pages have no limit in length, long tables are presented without interruption. In print output, however, long tables have to span more than one page.

The XSL-FO standard accomodates long tables in the headers and footers for print output:

In the case of a table element with title, there is no provision in XSL-FO 1.0 for repeating the title (perhaps with the word "continued") after each page break. This problem is addressed in XSL-FO 1.1 with table markers, but DocBook XSL does not yet support that. Some XSL-FO processors have extension mechanisms to provide a “continued” title. See the section “Table "continued" label” for an example using XEP.

If you have exceptionally long tables (several hundred rows), then you may run into problems with processor memory. In particular, Java processors such as Saxon and Xalan may run out of stack space. This happens because of the way the DocBook XSL stylesheets compute row spans. Since any entry may be affected by row spans above it, the stylesheet recursively processes the rows above to find such spans. Recursive templates use up stack space, and if there are hundreds of rows you might run out of stack space. One solution is to break the table into multiple smaller tgroup elements, each specifying the same fixed column widths. If you are using Java 6 or higher, you can simply increase the Java thread stack space with a command line option such as the following:

java -Xss2m ...

Earlier versions of Java do not support this option.