Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minidom: wrong processing of xmlns attributes #78487

Closed
vporton mannequin opened this issue Aug 1, 2018 · 2 comments
Closed

minidom: wrong processing of xmlns attributes #78487

vporton mannequin opened this issue Aug 1, 2018 · 2 comments
Labels
3.7 (EOL) end of life topic-XML type-bug An unexpected behavior, bug, or error

Comments

@vporton
Copy link
Mannequin

vporton mannequin commented Aug 1, 2018

BPO 34306
Nosy @vporton

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 = None
closed_at = <Date 2018-08-25.22:58:09.569>
created_at = <Date 2018-08-01.13:32:29.595>
labels = ['expert-XML', 'invalid', 'type-bug', '3.7']
title = 'minidom: wrong processing of xmlns attributes'
updated_at = <Date 2018-08-25.22:58:09.568>
user = 'https://github.com/vporton'

bugs.python.org fields:

activity = <Date 2018-08-25.22:58:09.568>
actor = 'porton'
assignee = 'none'
closed = True
closed_date = <Date 2018-08-25.22:58:09.569>
closer = 'porton'
components = ['XML']
creation = <Date 2018-08-01.13:32:29.595>
creator = 'porton'
dependencies = []
files = []
hgrepos = []
issue_num = 34306
keywords = []
message_count = 2.0
messages = ['322860', '324106']
nosy_count = 1.0
nosy_names = ['porton']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue34306'
versions = ['Python 2.7', 'Python 3.6', 'Python 3.7']

@vporton
Copy link
Mannequin Author

vporton mannequin commented Aug 1, 2018

The below script prints

http://www.w3.org/2000/xmlns/
aa:aa

It should print

None
aa:aa

because xmlns:z is NOT an attribute of xmlns namespace.

import xml.dom.minidom

```py
x = xml.dom.minidom.parseString("<x xmlns:z='aa:aa' z:q='1'/>")

for i in x.documentElement.attributes.values():
    print(i.namespaceURI)

@vporton vporton mannequin added 3.7 (EOL) end of life topic-XML labels Aug 1, 2018
@vporton
Copy link
Mannequin Author

vporton mannequin commented Aug 25, 2018

My bug report was wrong:

https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html
In the DOM, all namespace declaration attributes are by definition bound to the namespace URI: "http://www.w3.org/2000/xmlns/". These are the attributes whose namespace prefix or qualified name is "xmlns" as introduced in [XML Namespaces 1.1].

@vporton vporton mannequin closed this as completed Aug 25, 2018
@vporton vporton mannequin added invalid type-bug An unexpected behavior, bug, or error labels Aug 25, 2018
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life topic-XML type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

0 participants