[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Counting Colums in WML


Subject: [xsl] Counting Colums in WML
From: "Ciaran Byrne" <ciaran.byrne@xxxxxxx>
Date: Wed, 28 Feb 2001 16:59:52 -0800

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) &gt; 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



Current Thread