[xquery-talk] strange results sequence operators

Robby Pelssers Robby.Pelssers at nxp.com
Mon Aug 13 07:31:02 PDT 2012

@Michael: sorry.. I'm used to hitting the reply button.

So I may conclude that it should return the expected <number> tags as output, ignoring the order. I have to agree that my example was not a really accurate use case anyway but I just wanted to write a little blog about usage of these sequence operators and the output I got was not really helpful ;-)

I was using it a bit more exotic (even Sedna specific) and that function does give expected output.  Still the issue has been addressed on Sedna mailing list.

declare function basictypes:filterBySet($basictypes as element(Product)*, $set as xs:string*) as element(Product)* {
    $basictypes intersect (for $id in $set return index-scan('basictype_id', $id, 'EQ')) 


-----Original Message-----
From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On Behalf Of Florent Georges
Sent: Monday, August 13, 2012 4:23 PM
To: Michael Kay; talk at x-query.com
Subject: Re: [xquery-talk] strange results sequence operators

Michael Kay wrote:

> 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.

  Oops, I thought the OP talked about the difference in ordering
between the actual and expected result, but it seems I did not
look close enough at the problem.

  My bad, sorry for the noise.  Regards,

Florent Georges

talk at x-query.com

More information about the talk mailing list