Commit d4896797 authored by Guido van Rossum's avatar Guido van Rossum

Prep namespaceDict with the XML namespace, so we don't emit a

redundant namespace declaration for the xml prefix when we see <elem
xml:attr="">.
parent 4e4b0eb9
...@@ -101,7 +101,7 @@ class METALCompiler(DOMVisitor, TALGenerator): ...@@ -101,7 +101,7 @@ class METALCompiler(DOMVisitor, TALGenerator):
TALGenerator.__init__(self, expressionCompiler) TALGenerator.__init__(self, expressionCompiler)
def __call__(self): def __call__(self):
self.namespaceDict = {} self.namespaceDict = {"xml": XML_NS}
self.namespaceStack = [self.namespaceDict] self.namespaceStack = [self.namespaceDict]
DOMVisitor.__call__(self) DOMVisitor.__call__(self)
assert not self.stack assert not self.stack
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment