Is it possible to do a search for a key words in an exist-db using xquery?
I've tried using
//foo//@val[. &= $param]
But this returns an error because this isn't supported with my version of exist-db (1.4.2)
What is the best way to do a search over a number of nodes?
<xml>
<foo @val='test1'>
<bar @val='test2'>
<thunk @val='test3'/>
</bar>
</foo>
So with my example XML, how can I do
let $result :=
if //xml/foo[contains(@val,$param)] or
//xml/foo/bar[contains(@val,$param)] or
//xml/foo/bar/thunk[contains(@val,$param)]
return $result