Re: [xml] Invalid namespace definitions after namespace change
- From: Kasimier Buchcik <kbuchcik 4commerce de>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] Invalid namespace definitions after namespace change
- Date: Mon, 28 Feb 2005 18:43:58 +0100
Daniel Veillard wrote:
On Mon, Feb 28, 2005 at 01:14:56PM +0100, Kasimier Buchcik wrote:
For my needs that is still unacceptable. I implement an XMPP
implementation and for backward-compatibility with many Jabber clients
I need to use default namespaces (no prefixes) in some places.
I see, OK so you need total control of the declarations.
and as I pointed out in my answer to
you must be able to embbed XML instances in XMPP messages, those
instances may use namespaces in attribute content or text nodes, and
the suggested API would just break XMPP completely.
I admit, a xmlCleanupNsDecl() would be dangerous from this point of
view; the user would have to know about the QNames im use. Seems I
produced an extra amount of work for you today ;-)
I think a function to remove (or override) namespace declaration from
a node is what I need and I will request it via Bugzilla.
DOM and libxml2 are completely different because in libxml2 the namespace
informations are shared, if you modify the namespace node you instead of just
changing the anmespace pointer then you:
1/ don't have to chase all the other nodes to make the same change
2/ don't need to creat new namespaces node and try to track and remove
the old namespace informations
Yeah, changing the declaration from xmlns="http://b/" to
xmlns="http://a/" on <b> seems to be the most simple solution - if the
change for the subtree - not only for one specific node - is what Jacek
] [Thread Prev