[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Paths, node sorting & node constructors

Frans Englich frans.englich at telia.com
Sat Mar 15 11:46:51 PST 2008


  Paths
One thing with XQuery that I am constantly tripping over in XQuery is
that the 
result of sorting constructed elements is undefined. Consider this:

	path/(<h3>{...}</h3>,
	      <p>{...}</p>)


For a query like that the user has no guarantees for the order of the
result, 
and that is a bit counterintuitive. It's hard to blame the user who,
unaware 
of the rules of node sorting, expects the above query to come out as
what the query "reads to".

(An implementation can to some degree fix this by skipping node sorting
or return appropriately when the node order is implementation defined.
But that is still implementation specific, and it also boils down to the
strength of the query analysis.)

So what can one recommend users to do? To go away from XPath-style, and
use a for loop instead?


Cheers,

		Frans


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.