From: Seb Bacon Date: Tue, 29 Mar 2011 10:25:24 +0000 Subject: correct xpath filter transform X-Git-Url: https://maxious.lambdacomplex.org/git/?p=ckanext-datagovau.git&a=commitdiff&h=721774176770aa1e566605c2ecd0390cfba27639 --- correct xpath filter transform --- --- a/ckanext/exampletheme/__init__.py +++ b/ckanext/exampletheme/__init__.py @@ -66,7 +66,7 @@ found in the custom ``home/index.html`` template provided as part of the package). """ - stream = stream | Transformer('p[@id="examplething"]')\ + stream = stream | Transformer('//p[@id="examplething"]/text()')\ .substitute(r'frob', r'foobar') return stream --- a/ckanext/exampletheme/theme/templates/home/index.html +++ b/ckanext/exampletheme/theme/templates/home/index.html @@ -16,8 +16,11 @@

Welcome to Example Theme!

+

+ This page left intentionally ugly +

- This page left intentionally ugly + Here is the frob