You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2014-06-20.02:35:52.127>created_at=<Date2011-10-04.20:11:53.454>labels= ['expert-XML', 'type-bug', 'invalid']
title='xml.dom.minidom does not support default namespaces'updated_at=<Date2014-06-20.02:35:52.127>user='https://bugs.python.org/crass'
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: