Hey Godmar,
I'm quite positive that I resolved your reported namespace issue and would be pleased if you could provide us with some feedback.
Thanks for your help on improving BaseX.
Regards, Lukas
On Jul 14, 2010, at 9:33 PM, Godmar Back wrote:
On Wed, Jul 14, 2010 at 12:56 PM, Christian Grün <christian.gruen@gmail.com
wrote: So, in order to implement the update problem originally mentioned
in this
thread, which language/API would I use in BaseX?
- Godmar
I'm not sure what you mean with "implement the update problem"; if you want to bypass the current bug, you might try to create a simple document without namespace (<root/>), and add new nodes as children. The language you're using, or API, doesn't matter (as mentioned before, you'll have most freedom with our own API).
I apologize for being slow here. Suppose I have a Atom feed XML document. I need to replace one entry. The entry contains XML from multiple namespaces. I tried using the XQuery below:
declare namespace libx='http://libx.org/xml/libx2'; declare namespace atom='http://www.w3.org/2005/Atom'; declare variable $entry as xs:anyAtomicType external; declare variable $id as xs:string external; declare variable $feed as xs:anyAtomicType := doc('libx2_feed')/ atom:feed; delete node $feed/atom:entry[atom:id=$id], insert node $entry into $feed
I ran it via the XQJ binding, setting $entry to a DOM node implementation.
This fails.
What do you suggest I do instead? If I want this to work, should I not be using XQuery? Should I not be using a standard DOM node (using the built-in JDK org.w3c's implementation)? Should I not be using XQJ?
I don't understand what creating a new document <root /> would do to address this problem. Also, 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.
Godmar
Godmar
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk