Subject: Re: [xsl] Calculating cumulative values From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Sat, 3 Feb 2007 14:58:34 -0800 |
> If I needed to perform a sort on x and y1 first, could I do it in the same > stylesheet?
The solution I provided doesn't require any sort.
An xsl:sort instruction has to be added to the important part of the code in this way:
<xsl:for-each-group select="point" group-by="@x"> <xsl:sort select="current-grouping-key()" data-type="number"/> <xsl:for-each select="f:scanl1(f:add(), current-group()/@y1)"> <point x="{current-group()[1]/@x}" y="{.}"/> </xsl:for-each> </xsl:for-each-group>
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Calculating cumulative va, Dimitre Novatchev | Thread | Re: [xsl] Calculating cumulative va, Dimitre Novatchev |
Re: [xsl] Calculating cumulative va, Dimitre Novatchev | Date | RE: [xsl] Calculating cumulative va, Simon Shutter |
Month |