Not a direct answer to your question, I'm afraid, but here's what I do in my
HTML->FO stylesheet, for tables whose column widths are not specified:

<xsl:variable name="width"
select="concat(format-number(floor(number(substring-before($column-width,
'mm')) div count(html:tr[child::html:td][1]/html:td)), '#'), 'mm')" />
<xsl:for-each select="html:tr[child::html:td][1]/html:td">
  <fo:table-column>
    <xsl:attribute name="column-width"><xsl:value-of select="$width"
/></xsl:attribute>
  </fo:table-column>
</xsl:for-each>

($column-width is a predefined string variable that contains the width of
the printable area on the page: say, "160mm")

Basically, this divides the available width by the number of <td> (table
cell) tags in a table row, and then outputs a <fo:table-column> tag for each
table column.

If you can determine from your XML how many columns are in your table, then
you can at least specify equal column widths, as above.

(The above XSL snippet assumes that the row does not contain spanned cells.
Any advice on improving this gratefully received.)

Graham Hannington

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to