[xquery-talk] variable references in location steps
andrew.j.welch at gmail.com
Fri Feb 25 11:25:29 PST 2011
> let $test :=
> let $match2 := $test/el[matches(., 'match2')]
> return $test/a[./$match2]
I'm guessing there's a reason why you can't just do:
$test/a[el = 'match2']
and that you need to use matches() for the value compare, otherwise
that will slow things right down...
For the 2 step route, you could do:
$test/a[exists(el intersect $match2)]
..which might be worth doing if $match2 takes a lot to create.
More information about the talk