[xsl] Re: Top n values

Subject: [xsl] Re: Top n values
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 18 Oct 2002 04:23:25 -0700 (PDT)
> Hi Vasu,
> 
> Yes, he could do it like that, but why? Why resort to extensions and
> build a RTF, when he could just sort by item and filter by position -
> why make things the hard way?
> 
> Cheers,
> 
> Jarno

Because this is not acomplete and correct solution -- this will work
only if all values are different.

In case we have to select all elements, whose value is among the first
n, then we cannot use position(), because we do not know how many nodes
have a particular value.

In this case we must be able to compare a node from the sorted nodelist
with other nodes -- I do not see how this can be done without first
producing an RTF with the sorted nodes, then converting it to node-set
with the xxx:node-set() function and only then accessing the nodes in
the (new) document order.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread