diff markup/template.py @ 179:a2e0a7986d19

Implemented support for XPath variables in predicates (#31).
author cmlenz
date Mon, 21 Aug 2006 17:25:19 +0000
parents 7efcbf6b1cf2
children d07ce6c1dbbe
line wrap: on
line diff
--- a/markup/template.py
+++ b/markup/template.py
@@ -975,7 +975,7 @@
             for idx, (test, path, template, directives) in \
                     enumerate(match_templates):
 
-                if test(kind, data, pos) is True:
+                if test(kind, data, pos, ctxt) is True:
                     # Consume and store all events until an end event
                     # corresponding to this start event is encountered
                     content = [(kind, data, pos)]
@@ -987,7 +987,7 @@
                         elif kind is END:
                             depth -= 1
                         content.append((kind, data, pos))
-                        test(kind, data, pos)
+                        test(kind, data, pos, ctxt)
 
                     content = list(self._flatten(content, ctxt))
                     select = lambda path: Stream(content).select(path)
Copyright (C) 2012-2017 Edgewall Software