Hi!
I am executing all Xqueries through the same runQuery method in Java, and I am running the latest jar-files (8.0.1):
XQDataSource ds = new BaseXXQDataSource(); xqc = ds.getConnection(); XQExpression xqe = xqc.createExpression(); rs = xqe.executeQuery(query);
The query is (in this case): for $doc in (collection('Users/customer_1'))/* return (replace value of node $doc/@name with ("My new customer name"))
The update works fine in BaseX Gui, and I suspect the problem is that it does not return anything, and my code expects XQResultSequence. I have tried adding db:output to return part of the query with no luck. Do you have any suggestions?
Kind regards Ketill Fenne
Hi Ketill,
Welcome to our list.
XQJ was written to be compliant with XQuery 1.0, so it may well be that the db:output extension cannot be used with our (well, Charles Foster's) implementation of XQJ (yet). Have you tried to set the MIXUPDATES flag to true instead?
All the best, Christian
On Wed, Feb 25, 2015 at 5:02 PM, Ketill Fenne ketill.fenne@gmail.com wrote:
Hi!
I am executing all Xqueries through the same runQuery method in Java, and I am running the latest jar-files (8.0.1):
XQDataSource ds = new BaseXXQDataSource(); xqc = ds.getConnection(); XQExpression xqe = xqc.createExpression(); rs = xqe.executeQuery(query);
The query is (in this case): for $doc in (collection('Users/customer_1'))/* return (replace value of node $doc/@name with ("My new customer name"))
The update works fine in BaseX Gui, and I suspect the problem is that it does not return anything, and my code expects XQResultSequence. I have tried adding db:output to return part of the query with no luck. Do you have any suggestions?
Kind regards Ketill Fenne
basex-talk@mailman.uni-konstanz.de