id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
186,py:match not applied correctly in recursion,matt@…,cmlenz,"In this example, I have a template that matches `b[@type = 'bullet']` and a template that matchers just `b`. Normally the `b[@type = 'bullet']` match is applied correctly, but inside a `b` match it's not.

{{{
from genshi.template import MarkupTemplate

tmpl = MarkupTemplate(""""""<?xml version=""1.0"" ?>
<test xmlns:py=""http://genshi.edgewall.org/"">

    <py:match path=""b[@type = 'bullet']"">
        <bullet>${select('*|text()')}</bullet>
    </py:match>

    <py:match path=""group[@type = 'bullet']"">
        <ul>
            ${select('*')}
        </ul>
    </py:match>
    
    <py:match path=""b"">
        <generic>
            ${select('*|text()')}
        </generic>
    </py:match>
    
    <!-- This works -->
    
    <group type=""bullet"">
        <b type=""bullet"">1</b>
        <b type=""bullet"">2</b>
        <b type=""bullet"">3</b>
    </group>
    
    <!-- This should have identical output to the
    previous example but be wrapped in a ""generic""
    element. Instead, it stops matching the @type
    aware matches and uses generic for everything -->
    
    <b>
        <group type=""bullet"">
            <b type=""bullet"">1</b>
            <b type=""bullet"">2</b>
            <b type=""bullet"">3</b>
        </group>
    </b>
</test>
"""""")

print unicode(tmpl.generate())
}}}
",defect,closed,major,0.5,Template processing,0.4.4,fixed,match py:match recursive,
