On 27/03/2013 12:31, 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?
The ones that are trickiest to rewrite are those that reference the
context. For example
$y/(for $x in //item where $x/@status = . return $x)
To translate this into a predicate you need to introduce a variable:
$y/(let $z := . return //item[@status = $z])
Michael Kay
Saxonica
_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk