Dear Ralf,
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.
This means, on the other hand, that we won't do any more feature updates on JAX-RX, so we'll probably move your request to the basex-api repository.
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>
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?
Thanks, Christian
[1] http://docs.basex.org/wiki/REST [2] http://files.basex.org/releases/latest/
___________________________
On Wed, Sep 21, 2011 at 4:59 PM, Ralf Jung ralfjung-e@gmx.de wrote:
Hi list,
I am currently looking into BaseX to find out if it meets my requirements for an XML database with XQuery implementation and REST interface. I already got the data imported, now I'm looking into the queries I need. I just stumbled upon the following problem, and could not find any documentation to overcome it, just a bug report that I think is related (https://github.com/BaseXdb/jax-rx/issues/3).
The problem is that I need to work on XML data that is POSTed to the query, the data must be available during query execution. However I could not find a way to do so, the jax-rx parameters seem to be restricted to atomic values. Did I miss anything?
As work-around, I tried to construct the entire query in the database client (which in my case is Orbeon, the runtime for the XForms application that serves as user interface), serializing the XML into a string and making it part of the query, i.e. something like let $data = <xsl:value-of select="saxon:serialize($data)"/> The query is created correctly, however, I can not get it to execute on the server as BaseX requires a content-type of application/query+xml, whereas XForms submissions (the only way to issue POST requests from Orbeon) have a content-type of application/xml.
Is there any way to pass an XML data parameter, or at least to send a custom query without using a special mime-type?
Any help would be appreciated, Ralf _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk