Hi Christian,
thanks for the quick reply!
thanks for your feedback. With BaseX 6.8 (which is to be expected beginning of October), we're switching to our own, native REST implementation, which will allow us to put in new features much more easily, and enable a tighter integration of XQuery and other database features. The documentation [1] and snapshots [2] are already online.
The release is planned so soon - so, can I assume that current git master is reasonably stable? I could then directly start using it, then I do not have to switch the REST interface later.
For now, you could try to specify your input file within the XQuery and bind it e.g. to the context item, as shown in the following example:
<query xmlns="http://jax-rx.sourceforge.net"> <text><![CDATA[
declare context item := <....YourXMLInput.../>; ...your query...
]]></text>
</query>
Unfortunately, I can not send any <query> to the database due to the mime type restriction: I can not freely set the mime type, all I can do are POST queries with a mime-type of application/xml (at least I found no way to change that, I'll ask on the Orbeon mailing list). From all I read, that means I can not send POST queries to BaseX at all. A possible fox would be, to interpret a POST query to a URL like /rest?query with a mime-type of application/xml the same way as a query to /rest with a mime type of application/query+xml . Actually I was quite surprised to see that POST can also be used to store documents, which I'd usually expect to be the behaviour of PUT - it seems the both are almost the same in BaseX?
Kind regards, Ralf