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

RE: Dynamic Sort Value Solved

Subject: RE: Dynamic Sort Value Solved
From: "Allistair Crossley" <Allistair.Crossley@xxxxxxx>
Date: Wed, 2 Jul 2003 17:14:07 +0100
sort value
I have used Jeni's suggestion of

<xsl:sort select="@*[name() = $filterOrderBy]" order="ascending" />

which works perfectly. I understand what you are saying about needing to change the select so that the order has different values to operate on.

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: 02 July 2003 16:58
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Dynamic Sort Value Solved



> 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



<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


 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.