[XML-SIG] Attribute namespace bug
by Juergen Hermann other posts by this author
Aug 31 2001 6:42PM messages near this date
[XML-SIG] pyexpat errors with cvs current when building on win32 with vc
|
[XML-SIG] Handling of attribute namespaces
Hi!
This fixes the bug I found, can I commit it?
Index: saxutils.py
===================================================================
RCS file: /cvsroot/pyxml/xml/xml/sax/saxutils.py,v
retrieving revision 1.20
diff -u -r1.20 saxutils.py
--- saxutils.py 2001/07/19 16:15:44 1.20
+++ saxutils.py 2001/08/31 18:40:09
@@ -205,7 +205,13 @@
self._undeclared_ns_maps = []
for (name, value) in attrs.items():
- name = self._current_context[name[0]] + ":" + name[1]
+ if name[0] is None:
+ name = name[1]
+ elif self._current_context[name[0]] is None:
+ # default namespace
+ name = name[1]
+ else:
+ name = self._current_context[name[0]] + ":" + name[1]
self._out.write(' %s="%s"' % (name, escape(value)))
self._out.write('> ')
_______________________________________________
XML-SIG maillist - XML-SIG@[...].org
http://mail.python.org/mailman/listinfo/xml-sig
|