|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: count hits/matches - INCREMENT
> Is it possible in XSL to change the value of a variable in a > <xls:for-each> and get the value after the <xsl:for-each>? No, there is no need to do such strange contortions as required in imperative languages. If you need to know how many nodes are in a node set use select="count()" or if it is the current node set (for example you are inside the for-each, you can use last() so if you have <xsl:for-each select="/a/b/c"> ... Then <xsl:value-of select="count(/a/b/c)"/> and <xsl:value-of select="last()"/> both return the number of nodes in this set (last() is likely to be more efficient here, but of course count() is more general as you can count any node set) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








