Issue1767194
Created on 2007-08-03.16:37:38 by mastrodomenico, last changed 2007-09-21.08:17:49 by cgroves.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
xmllib.diff
|
mastrodomenico,
2007-08-03.16:37:38
|
This should fix the bug. |
|
|
| msg1799 (view) |
Author: Lino Mastrodomenico (mastrodomenico) |
Date: 2007-08-03.16:37:38 |
|
The xmllib in Jython 2.2rc3 sometimes incorrectly applies a namespace to attributes.
Test case:
Jython 2.2rc3 on java1.5.0_12
Type "copyright", "credits" or "license" for more information.
>>> import xmllib
>>> class Parser(xmllib.XMLParser):
... def unknown_starttag(self, tag, attrs):
... print attrs
...
>>> Parser().feed('<root xmlns="ns" name="value"/>')
{'ns name': 'value'}
The correct result should be: {'name': 'value'}
AFAIK this was only fixed in CPython 2.3 (but some Linux distributions fixed it already in their 2.2 packages), but I hope that this can be fixed in Jython 2.2 even if xmllib will be deprecated in 2.3 since it is useful now because using the xmllib parser allows using ElementTree out-of-the-box with Jython.
I have attached below a patch backported from CPython 2.3.
|
| msg1800 (view) |
Author: Charlie Groves (cgroves) |
Date: 2007-09-21.08:17:49 |
|
Applied in r3489.
|
|
| Date |
User |
Action |
Args |
| 2007-08-03 16:37:38 | mastrodomenico | create | |
|