String query="declare namespace ev = \"class:MyFOO\" for $s in ...
return ...{ev.EVAL(query1) }";
(new gnu.xquery.lang.Xquery()).eval(query);
The idea is that upon evaluation of query, Qexo will call the EVAL
function, which among other things will create another
gnu.xquery.lang.Xquery instance and evaluate query1, which is a string
containing another(independent) query. All works well except EVAL does
not work correctly--there seems to be a major state mix-up of query and
query1.
I know this is a weird way to use Xquery, but if you have an idea of why
bad things are happening, please let me know.