[xquery-talk] where clause

G. Ken Holman gkholman at CraneSoftwrights.com
Wed Mar 27 07:01:31 PST 2013

At 2013-03-27 13:26 +0000, deBakker, Bas wrote:
>Wouldn't that be equivalent to
>     for $a in expr1, $b in expr2, $c in expr3[$a = $b + .]
>     return $a

Thank you, Bas, yes I grant that your expression is equivalent to mine.

I failed to acknowledge that tuples are only created when there is a 
binding value for every member of the tuple.

I appreciate the clarification.

. . . . . . . . Ken

>-----Original Message-----
>From: talk-bounces at x-query.com [mailto:talk-bounces at x-query.com] On 
>Behalf Of G. Ken Holman
>Sent: Wednesday, March 27, 2013 14:19
>To: talk at x-query.com
>Subject: Re: [xquery-talk] where clause
>At 2013-03-27 08:31 -0400, Michael Sokolov wrote:
> >I'm trying to come up with examples in which "where" clauses cannot be
> >rewritten as XPath predicates.  So far, the ones I have all involve an
> >"at" counter.  Are there others?
>I can see no difference off hand when creating 1-tuples, as a 
>1-tuple is essentially just a sequence.
>However, when creating n-tuples (either with the "at" keyword as you 
>say or with other bound variables in your expression), the where 
>clause acts on the tuple, not just on a set of values.  Here is a 
>3-tuple expression example:
>     for $a in expr1, $b in expr2, $c in expr3
>     where $a=$b+$c
>     return $a
>I hope this is helpful.
>. . . . . . . . Ken

Public XSLT, XSL-FO, UBL and code list classes in Europe -- Apr 2013 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/m/ |
G. Ken Holman                   mailto:gkholman at CraneSoftwrights.com |
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal |

More information about the talk mailing list