On 2/3/07, Dimitre Novatchev <dnovatchev(_at_)gmail(_dot_)com> wrote:
> 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.
Actually some sort is required :o)
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
--~------------------------------------------------------------------
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>
--~--