W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2008

Re: Change value of Variable

From: sonika_nitj <sonika.janagill@patni.com>
Date: Sun, 19 Oct 2008 23:12:59 -0700 (PDT)
Message-ID: <20063750.post@talk.nabble.com>
To: www-xsl-fo@w3.org

If you are using <xsl:for-each select=""/> to iterate your records then you
can use position() function to get the record number.
 <xsl:for-each select="$Employees/Employee">
	<xsl:variable name="iCount" select="position()" />
...........Do Something...........

saqi wrote:
> Hello,
> I've a situation in which i have to count the number of
> transactions/records, retrieved from my XML document, on one page. I have
> to
> show that number at the end of each page, with this I've to also show the
> total number of records in one document. I figure it will be solved by
> using
> variables but still can't find the way to solve this issue, as variables
> can
> only be defined once and it cannot be accessed outside the boundary in
> which
> it is defined. Is there any possible way supported by XSLT?
> Thanks for your Help!
> Regards,
> Saqib javed

View this message in context: http://www.nabble.com/Change-value-of-Variable-tp20063020p20063750.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Monday, 20 October 2008 06:13:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:32 UTC