[xquery-talk] where clause

daniela florescu dflorescu at me.com
Thu Mar 28 10:22:08 PST 2013


Not in the general case of such pattern -- because of cardinality.
(I told you XQuery is twisted :-)

Imagine that the function would have looked like this instead of the one I wrote:


declare function foo($x) 
{
   if ($x/@a) then ($x, $x) else <b/>
};

then count(...) of the total result  is different  !

:-)

Dana



>> 
>>   
> Yes, that is twisted for sure.  But isn't it also equivalent to:
> 
> for $x in Blah1
> for $y in Blah2
> for $z in foo($y)[. is .]
> return $x
> 
> ?
> 
> not that that really makes any difference, in some sense, but given the problem as stated, I don't think a where clause is required
> 
> -- 
> Michael Sokolov
> Senior Architect
> Safari Books Online
> 
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk




More information about the talk mailing list