Hi Christian,
..it could look as follows (I'm using the latest REST syntax):
<query xmlns="http://www.basex.org/rest"> <text> (: example query :) /a/b </text> <input> <a> <b>example</b> </a> </input> </query>
While this would already be a step forwards, I'd also like to pass such an XML parameter to a query that is loaded from a file, so that I don't have to send it to the server again and again. Something like that, to also allow run queries via POST:
<run xmlns="http://www.basex.org/rest"> <file>query.xq</file> <!-- or maybe use "text" here as well, for consistency? sounds weird though --> <input><document/></input> <variable name="x" value="something"/> </run>
This would then allow all the three types of requests (query, run, command) both in GET and POST style.
I assume that, if the XML is set to be the context of the entire XQuery script, I can access it within the script like this?
let $param := . let $something := $param//text() ...
Regarding problems with REST: Personally, I'm developing with Eclipse and the m2eclipse plugin for Maven, which is why unfortunately I cannot give you help on your Maven problem. You might as well try our latest builds..
http://files.basex.org/releases/latest/
..that you can run with the start scripts [1] and libraries [2] provided in GitHub. If you are running BaseX, you won't need any additional libraries (indeed, most external libs are needed for the new WebDAV service based on the Milton API).
I see, the lib folder over there is useful, thanks... yeah, I know I can downloaded the precompiled jar files, but if I am using development versions I prefer to compile them myself, so that I can more easily try to change something here or there, and know exactly which version I got. I guess I will have to hope for someone to drop by and explain how to build that basex-api jar file, or for google to come up with something useful wrt Maven.
Kind regards, Ralf