XML and namespaces
Paul Boddie
paul at boddie.org.uk
Wed Dec 7 12:30:54 EST 2005
Paul Boddie wrote:
> It is difficult to say whether this usage of the API is correct or not, judging from the
> Web site's material
[...]
Some more on this: I found an example on the libxml2 mailing list
(searching for "xmlNewNs default namespace") which is similar to the
one I gave:
http://mail.gnome.org/archives/xml/2004-April/msg00282.html
Meanwhile, the usage of xmlNewNs seems to have some correlation with
the production of xmlns attributes (found in a search for "xmlns
default namespace"):
http://mail.gnome.org/archives/xml/2002-March/msg00111.html
And whilst gdome2 - the GNOME project's DOM wrapper for libxml2 - seems
to create unowned namespaces, adding them to the document as global
namespace declarations (looking at the code for gdome_xmlNewNs and
gdome_xml_doc_createElementNS respectively)...
http://cvs.gnome.org/viewcvs/gdome2/libgdome/gdomecore/gdome-xml-xmlutil.c?rev=1.18&view=markup
http://cvs.gnome.org/viewcvs/gdome2/libgdome/gdomecore/gdome-xml-document.c?rev=1.50&view=markup
...seemingly comparable operations with libxml2mod seem to be no longer
supported:
>>> libxml2mod.xmlNewGlobalNs(d, "DAV:", None)
xmlNewGlobalNs() deprecated function reached
Given that I've recently unsubscribed from some pretty unproductive
mailing lists, perhaps I should make some enquiries on the libxml2
mailing list and possibly report back.
Paul
More information about the Python-list
mailing list