This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author crass
Recipients crass
Date 2011-10-04.20:11:52
SpamBayes Score 0.001124808
Marked as misclassified No
Message-id <1317759114.05.0.782450819911.issue13102@psf.upfronthosting.co.za>
In-reply-to
Content
When using getAttributeNS, attributes with no namespace should be considered as having the default namespace for that scope.  See examples in http://www.w3.org/TR/REC-xml-names/#defaulting.  Python's xml.dom.minidom will always set the namespace to None for attributes that have no namespace prefix.

I've attached a test program to illustrate this issue in action.  The output I get is:
[((None, u'attr'), u'value1')]
[(('http://www.w3.org/2000/xmlns/', 'xmlns'), u'http://path/to/ns2#'), ((None, u'attr'), u'value2')]
[((u'http://path/to/ns2#', u'attr'), u'value3')]
Successfully got child3 attr value

In the first two cases the namespaceURI is None, but it should be set to the default namespace specified in the root element.  I believe this problem occurs with all *NS functions.  Not tested in 3.x.
History
Date User Action Args
2011-10-04 20:11:54crasssetrecipients: + crass
2011-10-04 20:11:54crasssetmessageid: <1317759114.05.0.782450819911.issue13102@psf.upfronthosting.co.za>
2011-10-04 20:11:53crasslinkissue13102 messages
2011-10-04 20:11:53crasscreate