[xquery-talk] strange results sequence operators

Michael Kay mike at saxonica.com
Mon Aug 13 07:01:20 PDT 2012

On 13/08/2012 14:08, Florent Georges wrote:
> Robby Pelssers wrote:
>    Hi,
>>      let $number1 := <number>1</number>
>>      let $number2 := <number>2</number>
>>      let $number3 := <number>3</number>
>>      let $seq1 :=  ($number1, $number2)
>>      let $seq2 := ($number2, $number3)
>>      return
>>        <result>
>>          <union>{$seq1 union $seq2}</union>
>>          <intersection>{$seq1 intersect $seq2}</intersection>
>>          <except>{$seq1 except $seq2}</except>
>>        </result>
>    Those operators return results in document order, and they come
> from different documents, so it's undefined.

I think the ordering of the items in the result is undefined for this 
reason, but apart from that the results are well defined by the spec and 
should be the "expected results" given.

Michael Kay

More information about the talk mailing list