View Single Post
  #6 (permalink)  
Old July 9th, 2007, 05:59 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

>I am sure there is or at least was a good reason for it.

Yes, there certainly was. The usual combination of factors - a mix of backwards compatibility with XPath 1.0 and the fact that there are many use cases where document order is clearly the right thing to do.

Personally, I pushed hard for an operator other than "/" that did a simple mapping of sequences without reordering, and I didn't get it because people pointed out that the "for" expression and "/" between them could do everything that was needed. You just have to learn how to use them.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote