Ralf,
you can be lucky, we've just realized another one of your feature requests. Your feedback is quite helpful indeed, as you're currently the first active external tester of our integrated REST implementation ;)
The initial context node for a query can now be specified by adding an additional <context/> item:
<query xmlns="http://www.basex.org/rest"> <text>for $i in .//text() return string-length($i)</text> <context> <xml> <text>Hello</text> <text>World</text> </xml> </context> </query>
We're still pondering how to deal with the content type issue; have you got any feedback from Orbeon? Christian ___________________________
On Thu, Sep 22, 2011 at 12:38 AM, Christian Grün christian.gruen@gmail.com wrote:
<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 shouldn't be any problem, as the "query" and "run" operations are very similar (see http://docs.basex.org/wiki/REST_POST_Schema).
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() ...
Exactly.
Regards, Christian