To follow up on my previous email, we observe the following.
We run a query:
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],
(: INVESTIGATE: this results in wrong xmlns entries :)
insert node $entry into $feed
whereby we bind 'entry' to a DOM node using the org.w3c. Implementation.
When we print the about-to-be-inserted entry from Java code prior to insertion, we see:
(rest omitted)
If we run a database dump via the org.basex.BaseX program (query: doc('libx2_feed')) right after the update, we see this:
<id>3</id>
<title> (rest omitted)
Other than the spurious 'xmlns=""', the rest looks ok.
It seems to me that BaseX should never allow two default namespace prefixes for any element.
- Godmar