[Zope-Checkins] CVS: Releases/Zope/lib/python/TAL - TALDefs.py:1.33 TALGenerator.py:1.60 TALParser.py:1.21
Evan Simpson
evan@zope.com
Mon, 16 Dec 2002 18:22:01 -0500
Update of /cvs-repository/Releases/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv24687
Modified Files:
TALDefs.py TALGenerator.py TALParser.py
Log Message:
Fix Collector #451 and #468
=== Releases/Zope/lib/python/TAL/TALDefs.py 1.32 => 1.33 ===
--- Releases/Zope/lib/python/TAL/TALDefs.py:1.32 Mon Dec 16 17:52:11 2002
+++ Releases/Zope/lib/python/TAL/TALDefs.py Mon Dec 16 18:21:31 2002
@@ -113,13 +113,15 @@
_subst_re = re.compile(r"\s*(?:(text|structure)\s+)?(.*)\Z", re.S)
del re
-def parseAttributeReplacements(arg):
+def parseAttributeReplacements(arg, xml):
dict = {}
for part in splitParts(arg):
m = _attr_re.match(part)
if not m:
raise TALError("Bad syntax in attributes:" + `part`)
name, expr = m.group(1, 2)
+ if xml:
+ name = name.lower()
if dict.has_key(name):
raise TALError("Duplicate attribute name in attributes:" + `part`)
dict[name] = expr
=== Releases/Zope/lib/python/TAL/TALGenerator.py 1.59 => 1.60 ===
--- Releases/Zope/lib/python/TAL/TALGenerator.py:1.59 Mon Dec 16 17:52:11 2002
+++ Releases/Zope/lib/python/TAL/TALGenerator.py Mon Dec 16 18:21:31 2002
@@ -646,7 +646,8 @@
self.pushProgram()
if attrsubst or i18nattrs:
if attrsubst:
- repldict = TALDefs.parseAttributeReplacements(attrsubst)
+ repldict = TALDefs.parseAttributeReplacements(attrsubst,
+ self.xml)
else:
repldict = {}
if i18nattrs:
=== Releases/Zope/lib/python/TAL/TALParser.py 1.20 => 1.21 ===
--- Releases/Zope/lib/python/TAL/TALParser.py:1.20 Wed Sep 18 11:12:48 2002
+++ Releases/Zope/lib/python/TAL/TALParser.py Mon Dec 16 18:21:31 2002
@@ -72,7 +72,7 @@
for key, value in attrlist:
key, keybase, keyns = self.fixname(key)
ns = keyns or namens # default to tag namespace
- item = key, value
+ item = key.lower(), value
if ns == 'metal':
metaldict[keybase] = value
item = item + ("metal",)