On 11/04/2011 17:11, Christian GrĂ¼n wrote:
Instead, you'll either have to include your XML snippet in the XQuery Update expression
And I hoped to achieve that (including XML snippet in the XQuery Update expression) via a jax-rx variable in a query parameter (the equivalent in an HTTP Post, actually), which would then be accessed in the updating xquery stored on the server side via a variable. Is it possible that way?
Looking at the schema required for the HTTP post, it appears that the element named query, which is supposed to contain the xquery, can be replaced instead with the element named run. As an example, I had hoped this would work (XML in xmlSnippet variable):
<?xml version="1.0" encoding="iso-8859-1"?><run xmlns="http://jax-rx.sourceforge.net"><text>updateDetails.xq</text><parameter name="output" value="media-type=application/xml"/><parameter name="output" value="encoding=iso-8859-1"/><parameter name="output" value="omit-xml-declaration=no"/><variable name="databaseName" value="MyData"/><variable name="xmlSnippet" value="<xml><data/></xml>"/></run>
In the example above, can the updateDetails.xq not retrieve the XML submitted via the variable xmlSnippet?