Re: [xsl] number of particular sub elements

Subject: Re: [xsl] number of particular sub elements
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Sun, 09 Sep 2007 14:09:37 +0200
John Smith wrote:
<xsl:template name="aName">
	<xsl:param name="max" select="particularSubElements.last()" />
....
</xsl:template>

so if the context node was 'x' I want to the number of 'y' sub elements:

count(y)


and change the param in your named template to be a variable if you don't mean the caller to set the amount for you:

<xsl:variable name="nr-of-y-children" select="count(y)" />

Cheers,
-- Abel Braaksma

Current Thread