[Home] [By Thread] [By Date] [Recent Entries]
At 2004-09-20 15:21 +0530, Eldho George wrote:
This would obtain *every* th and *every* td and give you one table column per item, which is why you are getting so many columns. Remember that all rows in an XSL-FO table will render with the same number of columns and the column edges will be the same for all rows in a single table. Thus, you need only traverse the maximum number of columns. The maximum number of columns can be obtained by sorting the rows by the number of columns, sorting them in descending order, and acting on the first of those: <xsl:for-each select="tr|thead/tr">
<xsl:sort select="count(td|th)" data-type="number"
order="descending"/>
<xsl:if test="position()=1">
<xsl:for-each select="td|th">
<table-column/>
</xsl:for-each>
</xsl:if>
</xsl:for-each>I hope this helps. ............................ Ken
|

Cart



