domish: handle spaces in xmlns IRIs
In the "name" received from pyexpat only the last space delimits
the namespace from the tag/attr name.
Any previous spaces are part of the namespace IRI.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
|
|
|
|
| 759 | 759 | |
| 760 | 760 | def _onStartElement(self, name, attrs): |
| 761 | 761 | # Generate a qname tuple from the provided name |
| 762 | | qname = name.split(" ") |
| | 762 | qname = name.rsplit(" ", 1) |
| 763 | 763 | if len(qname) == 1: |
| 764 | 764 | qname = ('', name) |
| 765 | 765 | |
| 766 | 766 | # Process attributes |
| 767 | 767 | for k, v in attrs.items(): |
| 768 | 768 | if k.find(" ") != -1: |
| 769 | | aqname = k.split(" ") |
| | 769 | aqname = k.rsplit(" ", 1) |
| 770 | 770 | attrs[(aqname[0], aqname[1])] = v |
| 771 | 771 | del attrs[k] |
| 772 | 772 | |