[xsl] counting/comparing values

Subject: [xsl] counting/comparing values
From: "Dunning, John" <JDunning@xxxxxxxxx>
Date: Fri, 9 Nov 2001 13:53:00 -0500
Greetings all,
I am stuck trying to get the highest number of child elements of a
particular type.  What I would like to do is return the count of the most
<entry> elements within a single <row> of a <table>:


The template processing this is:
<xsl:template match="table">
	<xsl:variable name="col_count">
	<xsl:for-each select="child::tbody[1]/row">
		<xsl:when test="count(preceding-sibling::row/child::entry)
&gt; count(entry)">
			<xsl:value-of select="count(entry)"/>
 <xsl:attribute name="col_count"><xsl:value-of

Which returns:
<table col_count="123"/>

When what I want is <table col_count="3"/>

Any ideas?  Any and all help appreciated.
Thanks, John

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread