On Fri, Jul 23, 2010 at 4:51 PM, Godmar Back godmar@gmail.com wrote:
On Fri, Jul 23, 2010 at 2:46 PM, Christian GrĂ¼n christian.gruen@gmail.com wrote:
Godmar,
thanks for the test case. Indeed, the problem was not intrinsic to the implementation of XQuery Update, but occurred in the peripheral wrapper for DOM instances. Your bug might now be fixed with version 6.2.2, which I've just uploaded:
http://www.inf.uni-konstanz.de/dbis/basex/maven/org/basex/basex/6.2.2/
This version fixes the test case, but doesn't fix the problem in our actual application, where it persists. I'll try to create a new test case.
Here's a new test case that still breaks:
http://top.cs.vt.edu/~gback/bx/b622/Test.java
This is the change I made:
http://top.cs.vt.edu/~gback/bx/b622/old-vs-new.diff
In exchange for helping you debug your XQJ implementation, could you help me understand my options when working with BaseX?
Specifically, let's say I'll switch to the client/server interface where I send XQuery and XQuery Update expressions and receive the result as textual XML. In this case, what do you recommend I do with respect to engineering my queries?
I'm thinking of turning my existing XQJ queries into templates, removing all 'external' variables, then performing textual replacement, perhaps via String.printf(). This should be easily doable, though by definition it will not be as robust as XQJ. For instance, I need to sanity check strings input by the user to not fall victim to injection attacks, need to take care of proper escaping, etc. etc. Before I embark on this, I'm wondering if such a templating system already exists, or if I would essentially be reimplementing XQJ, or what other options exist.
- Godmar