Hi Christian,
The XQJ driver comes with its own XQuery parser, which differs from the BaseX query parser.
Interesting. That's not what I would have been expecting. May I inquire why this is done like this?
It has been a closed-source development from Charles Foster [1]; you may need to directly contact him to see if there is a chance to get this fixed.
OK, I will try, but I am afraid that is not the only parser issue I am encountering, merely the one with the simplest steps to reproduce, so even if Charles is responsive, this may mean embarking on a longer journey.
As there haven’t been any considerable updates for a long time now, and as more recent features of XQuery are not supported by XQJ, we usually recommend users to work with our own APIs [2].
Yes, that's essentially the same response I got on saxon-help (use their S9API).
Unfortunately, for my use case that is less than ideal: I am developing a plug-in for Maven (unsurprisingly named xquery-maven-plugin) that does for XQuery what the xml-maven-plugin does for XSLT [1]: offer a goal to query and transform some inputs w.r.t. to a stylesheet/query.
Thus, my plug-in requires a common interface to the XQuery engines. XQJ seemed like the natural conterpart of javax.xml.transform used by the xml-maven-plugin, but I guess I really have to to write my own wrapper around Saxon's S9API and BaseX's API, if only because the XQJ integration seems to be among the least tested and most buggy parts of the XQuery engines I have tried so far.
Best wishes,
Andreas Sewe
[1] https://www.mojohaus.org/xml-maven-plugin/transform-mojo.html