[xquery-talk] Wrong sort and distainct-values result in nested
queryes - parameters passing problems
davidc at nag.co.uk
Wed Jun 28 17:09:40 PDT 2006
for $Flat in doc("/db/Flat.xml")/x/y
so $Flat is (at each iteration) a single y element node.
let $Ordered := local:Order($Flat)
so local:order is just being passed a single y node so the sorting is a
no-op as it is a sequence of length 1.
so this just returns $Ordered which is always the same as $Flat
and the end result is that the original sequence is generated.
You want to sort the sequence as a whole, not each item in the sequence
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:
More information about the talk