[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Top n values

Subject: Re: Top n values
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Fri, 18 Oct 2002 04:23:25 -0700 (PDT)
xslt top n
> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.