Subject: Re: [xsl] sorting by comparing two nodes From: Claus Nagel <claus_nagel@xxxxxx> Date: Tue, 20 Dec 2005 09:17:03 +0100 
> I am not all that clear on how you would sort these. I try to implement a Graham scan to compute the convex hull of the points. > expr:= sqrt((x$ref/x)^2+(y$ref/y)^2) thanks for your idea. but your expr just takes one point and the reference point as the sorting key. my sorting key changes each time another pair of points is compared. well, what I need would be something like: <xsl:foreach select="$points"> <xsl:sort select="expr"/> > to compute the expr I need to know the values af the actual point and the values of its predecessor. </xsl:foreach> I know I can't access the predecessor in a xsl:sort. But is there another way to implement this? Well in the end it is just a normal quicksort with a function which compares two elements and returns 1 or 0 or 1 to determine the way of sorting.
Current Thread 


< Previous  Index  Next > 

[xsl] sorting by comparing two node, Claus Nagel  Thread  Re: [xsl] sorting by comparing two , Ragulf Pickaxe 
Re: [xsl] sorting by comparing two , Ragulf Pickaxe  Date  Re: [xsl] sorting by comparing two , Ragulf Pickaxe 
Month 