Use replace makes no difference, the same problem persists.
Also, I think a 'return' is needed for this to be a well-formed query.
We're still unable to use BaseX to perform simple node replacement operations when the nodes use namespaces.
- Godmar
On Wed, Jul 14, 2010 at 5:55 PM, Christian Grün christian.gruen@gmail.comwrote:
[...] it seems to me that replacing a part of a XML document (which is what I'm trying to do) should be a straightforward operation
for
an XML database.
Sure it is. What have your tried so far? XQuery offers (actually too) many ways to do the same thing; you could opt for replacing the $entry variable with the XML fragment in question. Or you could use the replace expression, e.g.
declare namespace atom = 'http://www.w3.org/2005/Atom'; let $old := doc('libx2_feed')/atom:feed/atom:entry[atom:id=$id] let $new := <node>to be added</node| replace node $old with $new
Christian