[Checkins] SVN: z3c.pt/trunk/ Support 'fill-slot' attribute on elements with METAL namespace.
Malthe Borch
mborch at gmail.com
Sat Sep 13 17:53:52 EDT 2008
Log message for revision 91130:
Support 'fill-slot' attribute on elements with METAL namespace.
Changed:
U z3c.pt/trunk/CHANGES.txt
U z3c.pt/trunk/src/z3c/pt/translation.py
U z3c.pt/trunk/src/z3c/pt/zpt.txt
-=-
Modified: z3c.pt/trunk/CHANGES.txt
===================================================================
--- z3c.pt/trunk/CHANGES.txt 2008-09-13 21:47:26 UTC (rev 91129)
+++ z3c.pt/trunk/CHANGES.txt 2008-09-13 21:53:52 UTC (rev 91130)
@@ -185,6 +185,8 @@
Bugfixes
+- Support "fill-slot" on elements with METAL namespace. [malthe]
+
- Omit element text when rendering macro. [malthe]
- ``Macros`` class should not return callable functions, but rather a
Modified: z3c.pt/trunk/src/z3c/pt/translation.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/translation.py 2008-09-13 21:47:26 UTC (rev 91129)
+++ z3c.pt/trunk/src/z3c/pt/translation.py 2008-09-13 21:53:52 UTC (rev 91130)
@@ -245,7 +245,8 @@
# and save value in a temporary variable
kwargs = []
for element in self.element.xpath(
- './/*[@metal:fill-slot]', namespaces={'metal': config.METAL_NS}):
+ './/*[@metal:fill-slot] | .//metal:*[@fill-slot]',
+ namespaces={'metal': config.METAL_NS}):
if element.node.fill_slot is None:
# XXX this should not be necessary, but the above
# xpath expression finds non-"metal:fill-slot"
Modified: z3c.pt/trunk/src/z3c/pt/zpt.txt
===================================================================
--- z3c.pt/trunk/src/z3c/pt/zpt.txt 2008-09-13 21:47:26 UTC (rev 91129)
+++ z3c.pt/trunk/src/z3c/pt/zpt.txt 2008-09-13 21:53:52 UTC (rev 91130)
@@ -323,7 +323,7 @@
... </div>
... <div metal:use-macro="template.macros['greeting']">
... <div>
- ... <span metal:fill-slot="name">earth!</span>
+ ... <metal:earth fill-slot="name">earth!</metal:earth>
... </div>
... </div>
... <div metal:use-macro="template.macros['greeting']">
More information about the Checkins
mailing list