New submission from Herm Fischer <fisc...@markv.com>: Minidom raises an exception if there's a space anywhere in the URI of an xmlns, but it is legal (but terrible practice) to have spaces in URIs. I think this should work or politely raise a syntax error. E.g., this fails: xmlns:abc="http:abc.com/de f g/hi/j k".
The attachment xml file from an end user has this xmlns: xmlns:verrels=" http://xbrl.org/2010/versioning-relationship-sets" which causes minidom to raise a ValueError exception, instead of a sensible syntax error message. The relevant python code is expabuilder.py, method _parse_ns_name, which does not have an elif for len(parts) != 2 (to raise a syntax error which identifies the bad construct). ---------- components: XML files: test.xml messages: 137329 nosy: hfischer priority: normal severity: normal status: open title: minidom xmlns not handling spaces in xmlns attribute value field type: crash versions: Python 3.2 Added file: http://bugs.python.org/file22203/test.xml _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12220> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com