FLWR syntax

Is it possible to add a predicate to the
end of a FOR clause?
ForClause ::= “for” Variable “in” Expr ("," Variable “in” Expr)*
implies not.

I’m thinking of selecting
FOR $a IN $cnt [ number($cnt/bibno) < ‘1000’]
to iterate over $cnt only as far as the bibno
child value = 1000.

Regards DaveP

FOR $a IN $cnt[ int(./bibno) < 1000]
return {$a}

the above is exactly one way to do this in XQuery.
Just use the XPath qualifier syntax.

Another way to express this is by way the
where clause:

FOR $a IN $cnt
where int($a/bibno) < 1000
return {$a}


Sven Eric