[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/translation.py Include self. This fixes an issue where macros were not being found if declared on the root node.

Malthe Borch mborch at gmail.com
Tue Aug 19 18:09:44 EDT 2008


Log message for revision 90021:
  Include self. This fixes an issue where macros were not being found if declared on the root node.

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-19 17:36:15 UTC (rev 90020)
+++ z3c.pt/trunk/src/z3c/pt/translation.py	2008-08-19 22:09:43 UTC (rev 90021)
@@ -421,7 +421,7 @@
     # skip to macro
     if macro is not None:
         elements = root.xpath(
-            './/*[@metal:define-macro="%s"]' % macro,
+            'descendant-or-self::*[@metal:define-macro="%s"]' % macro,
             namespaces={'metal': config.METAL_NS})
 
         if not elements:



More information about the Checkins mailing list