Reputation: 74
I have to make multiple calls to a Xquery server in a single request (to enable a transaction behavior). It's something like this
declare namespace foo = "ns.bar.foo";
( foo:call("toto"), foo:call("tata"), foo:call("titi"))
But if I do that, the server returns
<?xml version="1.0" encoding="UTF-8"?>
<call-result> 1 </call-result>
<call-result> 2 </call-result>
<call-result> 3 </call-result>
Which is not a valid XML file because the results are not inside a root tag. My first try was something like
declare namespace foo = "ns.bar.foo";
<results> {( foo:call("toto"), foo:call("tata"), foo:call("titi"))} </results>
But since foo:call is an updating expression, it's not allowed.The only thing I see is to modify the received XML on the client side but that's really dirty. I could also add a method on the server side, like a foo:calls, but foo:call already works with sequences as a parameter, and you cannot have sequences of sequences in xQuery. Any suggestion?
Upvotes: 0
Views: 62