Re: [xsl] Re: Display the number of records in a group

Subject: Re: [xsl] Re: Display the number of records in a group
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 17 Mar 2010 16:40:38 +0000
On 17/03/2010 16:15, anil kumar wrote:

I'm not sure what the problem was any more, but inide the for-each-group position() goes from 1 to 8, as last() is 8 as there are 8 groups.

If you don't want the groups, just the number, you can stop after the first and output 8, eg:


<xsl:for-each-group select="G_ROW[INTRA_EU_TRX_CODE = ('GOOD','TRIANGULATION')]" group-by="concat(VAT_TAX_NO,BILL_CUST_NAME,INTRA_EU_TRX_CODE)"> <xsl:if test="position()=1">[<xsl:value-of select="last()"/>]</xsl:if> </xsl:for-each-group>

David

 saxon9 ak.xml ak.xsl
<?xml version="1.0" encoding="UTF-8"?>
<mezo eazon="0A0001D003A">[8]</mezo>

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________


Current Thread