Instead, we could introduce an <input/> element, the child of which would represent the element to be bound as context item. Would this be helpful?
So, what would the request look like? After all I also need to specify the xquery file somewhere.
..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>
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).
Christian
[1] https://github.com/BaseXdb/basex-api/tree/master/etc [2] https://github.com/BaseXdb/basex-api/tree/master/lib