Message1799
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. |
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:17:57 | admin | link | issue1767194 messages |
| 2008-02-20 17:17:57 | admin | create | |
|