[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/translation.py Added namespace support for METAL directives.

Malthe Borch mborch at gmail.com
Sun Aug 10 06:16:05 EDT 2008


Log message for revision 89595:
  Added namespace support for METAL directives.

Changed:
  U   z3c.pt/trunk/src/z3c/pt/translation.py

-=-
Modified: z3c.pt/trunk/src/z3c/pt/translation.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/translation.py	2008-08-10 09:01:18 UTC (rev 89594)
+++ z3c.pt/trunk/src/z3c/pt/translation.py	2008-08-10 10:16:05 UTC (rev 89595)
@@ -601,6 +601,12 @@
 
         return attributes
 
+class METALElement(Element):
+    metal_define = utils.attribute('define-macro', lambda p: p.method)
+    metal_use = utils.attribute('use-macro', lambda p: p.expression)
+    metal_fillslot = utils.attribute('fill-slot')
+    metal_defineslot = utils.attribute('define-slot')
+
 class PyElement(Element):
     tal_omit = utils.attribute("omit-tag", lambda p: p.expression, u"")
 
@@ -632,6 +638,7 @@
     
 ns_lookup(config.XML_NS)[None] = Element
 ns_lookup(config.TAL_NS)[None] = TALElement
+ns_lookup(config.METAL_NS)[None] = METALElement
 ns_lookup(config.PY_NS)["if"] = PyIfElement
 ns_lookup(config.PY_NS)["for"] = PyForElement
 ns_lookup(config.PY_NS)["def"] = PyDefElement



More information about the Checkins mailing list