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

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


Subject: Re: [xsl] Display the number of records in a group
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 09 Mar 2010 09:57:43 +0000

On 09/03/2010 06:29, anil kumar wrote:
Hi,

Sorry if i confused you.

Let me explain more clearly


you are outputting a value on every group when you just want to output one value
so you want


<xsl:value-of select="last()"/>                          giving o/p as
  <mezo eazon="0A0001D003A">1111111111111111</mezo>


last() should give all 8's not all 1's (I'd guess)


so if you only want it output once guard it with
<xsl:if test="position()=last()">
    <mezo eazon="0A0001D003A"><xsl:value-of select="position()"/></mezo>
</xsl:if>




My xml consists of 11 records , ================================ 123 ABC GOOD 10 123 ABC GOOD 20 123 ABC GOOD 30


XML doesn't have records but elements, it would be more helpful to show the xml markup.


David




________________________________________________________________________ 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
Keywords
xml