Ticket #187 (closed defect: worksforme)
Hierarchical matches do not work correctly across a py:match
| Reported by: | Matt Chaput <matt@…> | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Template processing | Version: | devel |
| Keywords: | Cc: |
Description
In the following example, the second py:match (a/b) should match the <b /> below, but because the surrounding <a> element is a py:match, the hierachical match apparently does not see the a tag.
from genshi.template import MarkupTemplate tmpl = MarkupTemplate("""<?xml version="1.0" ?> <test xmlns:py="http://genshi.edgewall.org/"> <py:match path="a">${select('*')}</py:match> <py:match path="a/b">Right</py:match> <py:match path="b">Wrong</py:match> <a><b /></a> </test> """) print unicode(tmpl.generate())
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
