XQuery issue

the following xquery

let $v := (c1,c2,c3),
$r:= (
for $a in (for $a1 in $v return $a1)/b/c
return $a)
return {$r}

returns

c1


c2


c3


while it should have returned

c1
c2
c3


as in

let $v := (c1,c2,c3),
$c := (for $a1 in $v return $a1),
$r:= (
for $a in $c/b/c
return $a)
return {$r}

I agree, the response looks wrong to me (and Saxon 7.6.5 gives the response you were expecting). You didn’t say which XQuery processor you were using, but it looks as if it has a bug.

Michael Kay

Yes I guess I forgut to mention
the xQuery processors are
Tamino 4.1.4 and QuiP