Re: [xsl] Dynamic Sort Value Solved

Subject: Re: [xsl] Dynamic Sort Value Solved
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 2 Jul 2003 16:58:12 +0100
> there is only one filterOrderBy node. They are nodes that represent
> query parameters from a web page. 

It doesn't matter how many there are, you never want to start a sort key
with / or // or have it be a variable, or any other expression that
gives the same result for every item.

the point of a sort key is that for _each_ item in the list the sort
expression is evaluated to return a number or string and it is these
numbers/strings that are used to order the items.

if every item uses the same string as its sort key, then sorting will
not change the order of any list.

So a sort key effectively has to be a relative path expression that is
evaluated from each item in the list.

(this isn't quite true, a path such as //x[@name()=current()] would also
give different values for different items)

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


Current Thread