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

Re: order-by vs xsl:sort

Subject: Re: order-by vs xsl:sort
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 29 Apr 2005 14:40:44 +0100
order by in xsl
> Isn't this simpler?

well yes but it doesn't work in general. As in this simple case you
could force the returned values to be a string so you could stick them
all in a sequence. In general if the returned values are a sequence you
can't put them in a sequence without having it all being flattened (which
is why they have to invent tuples, aka sequences of sequences to
describe this in the spec).

Also in general you need the actual value for sorting as a number or
whatever not just its string representation.
I don't think this is possible using this kind of construct (I started
somewhere around there...:-)

In other words, I'm not really interested in the example I posted but I
am interested in a general procedure to express

for $i in $is,  $j in $js
order by f($i,$j)
return
g($i,$j)

in xslt for arbitrary sequences $is and $js and arbitrary functions f
and g.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
________________________________________________________________________

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.