There are even good reasons for replacing
> / with !, e.g. if you do not want to have duplicate-free and ordered
> results.
> 

Yes, I'm advising people to do that, especially after a variable reference as 
in 

for ... return $x/item

which hardly ever needs a sort into document order so it's better to write 
$x!item.

I had a case reported to me recently where $var was a sequence of three 
parentless element nodes and $var / item essentially randomized the order 
because the relative order of nodes in different trees is undefined. Much 
better to write $var ! item which (a) makes the result predictable, and (b) 
avoids the cost of an unwanted sort.

Michael Kay
Saxonica


_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to