xsl-list
[Top] [All Lists]

Re: [xsl] Counting total of groups

2006-06-01 04:39:46

I have seen that in XSLT 2.0 we have an incremental function 

not sure what you mean here, XSLT2 (and XSLT1, and other declarative
languages and a few hundred years of the use of "variable" in
mathematics) binds variables to values not to storage locations so you
can't "increment a variable" (by which you mean store a new value at the
location referenced by the variable).

Since yours is a grouping problem the solution would look a lot nicer in
XSLT2 which has xsl:for-each-group rather than the count(...key())
muenchian grouping idiom, but the facilities to get the group totals
(count() and last() would be the same. Whether to switch to XSLT2 now
(before it's a final rec and while there's really only one stable
implementation) depends on where you need to deploy the code, and on
commercial/political issues relating to when's a good time to switch to
new versions.



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
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>