[xquery-talk] strange results sequence operators

David Lee dlee at calldei.com
Mon Aug 13 06:55:37 PDT 2012


I have lost track here of what is "wrong".

Your example below should always return <number>1</number>
(to my understanding of XQuery).

The identity of constructed elements is maintained so equality is guaranteed,
but not ordering.



----------------------------------------
David A. Lee
dlee at calldei.com
http://www.xmlsh.org

> -----Original Message-----
> From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On
> Behalf Of Andrew Welch
> Sent: Monday, August 13, 2012 9:43 AM
> To: Florent Georges
> Cc: talk at x-query.com; Robby Pelssers
> Subject: Re: [xquery-talk] strange results sequence operators
> 
> >   Those operators return results in document order, and they come
> > from different documents, so it's undefined.
> 
> Good point (the elements without a common parent arent siblings
> gotcha), but I'm not sure that applies here... for example:
> 
> let $number1 := <number>1</number>
> let $number2 := <number>2</number>
> let $number3 := <number>3</number>
> let $seq1 :=  ($number1, $number2)
> let $seq2 := ($number2, $number3)
> 
> return $seq1 except $seq2
> 
> That always has to return <number>1</number>... both sequences refer
> to same $number2 even it exists in different documents to 1 and 3.
> What am I missing?
> 
> 
> --
> Andrew Welch
> http://andrewjwelch.com
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk





More information about the talk mailing list