I see - nice! Still trying to wrap my head around it to generalize, but I see your point.

-Mike

On 03/28/2013 02:22 PM, daniela florescu wrote:
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

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk


--
Michael Sokolov
Senior Architect
Safari Books Online

_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to