| My proposal would be to correct the test case to pass "ns1:doc" as | the qname,
I see that as being the best fix, and have now committed it.
Thanks!
| and to correct the generator to output the qname if that was | provided by the reader.
We could do that, but the namespace name and the qname are supposed to be equivalent in any case, so I don't see any reason to change it.
What about <foo xmlns:mine="martin:von.loewis"> <bar xmlns:meiner="martin:von.loewis"> mine:foobar/ meiner:foobar/ </bar> </foo> In that case, one of the qnames will change on output when your algorithm is used - even if the parser provided the original names. By the way, when parsing this text via import xml.sax,xml.sax.handler,xml.sax.saxutils,StringIO p=xml.sax.make_parser() p.setContentHandler(xml.sax.saxutils.XMLGenerator()) p.setFeature(xml.sax.handler.feature_namespaces,1) i=xml.sax.InputSource() i.setByteStream(StringIO.StringIO("""<foo xmlns:mine="martin:von.loewis"><bar xmlns:meiner="martin:von.loewis">mine:foobar/meiner:foobar/</bar></foo>""")) p.parse(i) print I get a number of interesting failures. Would you mind looking into that? On a related note, it seems that "xml:hello/" won't unparse properly, either... Regards, Martin