Chuck Paussa wrote:
<xsl:variable name="numcolumns" select="count(./tbody/tr/*)"/>

This will count all cells in the whole table body. If all rows have the same number of cells, and never use colspan nor rowspan, select="count(tbody/tr[1]/*) should work (the "./" is redundant). If rowspans/colspans are present, a general solution appears to be hard. Norman Walsh himself asked for this on the XSL list. His docbook-xsl, available at http://sourceforge.net/projects/docbook/ contains a module for translating CALS tables to HTML and FO. I haven't checked whether the span related issues has been resolved. One problem is that the docbook-xsl style sheets create fo:table-and-caption FO, which are not implemented in FOP, and usually create auto layout tables, without preset column widths, which are needed by FOP. Unfortunately, even proportional column widths, which can be implemented in FOP using the proportional-column-width() function, are generated by docbook-xsl as NN% mesurements. Too bad. Some people have said on this list that trivial hacking of the style sheets got them around these problems.

HTH
J.Pietschmann



Reply via email to