Alan Kennedy wrote: > Serialisation and namespace normalisation are both in the realm of DOM > Level 3, whereas minidom is only L2 compliant. Automagically introducing > L3 semantics into the L2 implementation is the wrong thing to do.
I think I'll have to either add some configuration support, in order to let the user specify which standards they have in mind, or to deny/assert support for one or another of the standards. It's interesting that minidom plus PrettyPrint seems to generate the xmlns attributes in the serialisation, though; should that be reported as a bug? As for the toxml method in minidom, the subject did seem to be briefly discussed on the XML-SIG mailing list earlier in the year: http://mail.python.org/pipermail/xml-sig/2005-July/011157.html > its-not-about-namespaces-its-about-automagic-ly'yrs Well, with the automagic, all DOM users get the once in a lifetime chance to exchange those lead boots for concrete ones. I'm sure there are all sorts of interesting reasons for assigning namespaces to nodes, serialising the document, and then not getting all the document information back when parsing it, but I'd rather be spared all the "amusement" behind all those reasons and just have life made easier for just about everyone concerned. I think the closing remarks in the following message say it pretty well: http://mail-archives.apache.org/mod_mbox/xml-security-dev/200409.mbox/<1095071819.17967.44.camel%40amida> And there are some interesting comments on this archived page, too: http://web.archive.org/web/20010211173643/http://xmlbastard.editthispage.com/discuss/msgReader$6 Anyway, thank you for your helpful commentary on this matter! Paul -- http://mail.python.org/mailman/listinfo/python-list