Re: [xml] Invalid namespace definitions after namespace change



Hi,

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 http://bugzilla.gnome.org/show_bug.cgi?id=168764 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.

Exactly.

[1] http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms.html


  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
needs.

Greetings,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]