This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Counting Colums in WML
- To: "Xsl-List" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Counting Colums in WML
- From: "Ciaran Byrne" <ciaran dot byrne at 3tl dot com>
- Date: Wed, 28 Feb 2001 16:59:52 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi all,
I'm attempting to calculate the number of colums
as the no. of columns required by the row with the most columns.
So in my stylesheet I have something along the lines of
<xsl:for-each select="tr">
<xsl:choose>
<xsl:when test="count(td) > count(preceding::td)">
<xsl:value-of select="count(td)"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
How do I store the max. value ? In a param/ variable ?
Thanks for the help.
Ciaran.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list