[ZPT] CVS: Zope/lib/python/TAL - HTMLTALParser.py:1.34

Fred L. Drake, Jr. fdrake@acm.org
Tue, 27 Aug 2002 14:31:17 -0400


Update of /cvs-repository/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv27362

Modified Files:
	HTMLTALParser.py 
Log Message:
We should only magically infer a namespace based on the container
element if there isn't a prefix in the attribute name.

Fixes http://mail.zope.org/pipermail/zpt/2002-August/003697.html


=== Zope/lib/python/TAL/HTMLTALParser.py 1.33 => 1.34 ===
--- Zope/lib/python/TAL/HTMLTALParser.py:1.33	Wed Aug 14 17:58:54 2002
+++ Zope/lib/python/TAL/HTMLTALParser.py	Tue Aug 27 14:31:17 2002
@@ -270,7 +270,10 @@
         for item in attrs:
             key, value = item
             key, keybase, keyns = self.fixname(key)
-            ns = keyns or namens # default to tag namespace
+            if ':' in key and not keyns:
+                ns = 0
+            else:
+                ns = keyns or namens # default to tag namespace
             if ns and ns != 'unknown':
                 item = (key, value, ns)
             if ns == 'tal':