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

[xsl] Testing for Last Group in For-Each-Group


Subject: [xsl] Testing for Last Group in For-Each-Group
From: Jeff Sese <jsese@xxxxxxxxxxxx>
Date: Tue, 18 Dec 2007 16:23:30 +0800

Hi,

I have a for-each-group instruction, how can i test if the group i'm processing is the last one?

<xsl:for-each-group select="node()" group-starting-with="br">
	<group last="{if (last()) the 'yes' else 'no'}">
		<xsl:copy-of select="current-group()"/>
	</group>
</xsl:for-each-group>

I keep on getting 'yes'...

TIA
-- Jeff


Current Thread