[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/genshi.py We expect the XPath-function to be available on the root-element, not the root tree (which seems to be merely an lxml implementation detail).

Malthe Borch mborch at gmail.com
Fri Aug 22 04:23:31 EDT 2008


Log message for revision 90116:
  We expect the XPath-function to be available on the root-element, not the root tree (which seems to be merely an lxml implementation detail).

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

-=-
Modified: z3c.pt/trunk/src/z3c/pt/genshi.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/genshi.py	2008-08-22 08:22:32 UTC (rev 90115)
+++ z3c.pt/trunk/src/z3c/pt/genshi.py	2008-08-22 08:23:29 UTC (rev 90116)
@@ -138,7 +138,8 @@
             name = stream.save()
             element.attrib[utils.py_attr('def')] = "%s(select)" % name
 
-            matches = self.getroottree().xpath(element.py_match, namespaces=nsmap)
+            matches = self.getroottree().getroot().xpath(
+                element.py_match, namespaces=nsmap)
             for match in matches:
                 # save reference to bound xpath-function
                 select = stream.save()



More information about the Checkins mailing list