When running an
XQuery that includes a library module like , it works fine the first
time, but attempts to re-use the compiler to compile another query
apparently result in the function from the imported library not being
This is a known bug which will be fixed in the next maintenance release:
This should fail saying the method needs Saxon-EE: I'll change it to
improve the diagnostics.
In an attempt to work around this, I was trying
XQueryCompiler.compileLibrary(File query) function, but that seems to
always give syntax errors on libraries, like:
Yes, that's correct.
Then I gave XQueryCompiler.compileLibrary(String query) a try,
and it tells me that feature is only available on Saxon-EE.
Yes. Sorry for the inconvenience.
I suppose for now the workaround for queries that import
libraries is to create a new compiler for every query?