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

Re: Ranking Random Nodes from Top to Bottom

Subject: Re: Ranking Random Nodes from Top to Bottom
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 17 Aug 2007 16:08:24 +0200
Re:  Ranking Random Nodes from Top to Bottom
Michael Kay wrote:
This is an interesting hint! Michael, do you mean that this collation order automatically sorts the following "correctly" (defined as: treat numeric parts as numeric)?

root[1]/node[12]
root[1]/node[6]
root[1]/node[11]
root[1]/node[0045]

into:
root[1]/node[6]
root[1]/node[11]
root[1]/node[12]
root[1]/node[0045]


Yes.

Wow, I'm impressed. I guess I should read the docs better ;).


I use a generalized sorting routine that does something like tokenize by numeric values and then sort by appending zeros and concatenating it with the rest into a string (much like my earlier solution in this thread, but more generic). Time to throw that piece of code away ;)

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.