Genshi Nested Matching Patterns

Ho, do I get Genshi to analyze the output of the matching pattern?

In other words:

I have a template like this in Genshi:

<py:match path="gm:field"> Something ${select('@label')}<br /> ${select('*')} Something else<br /> </py:match> 

For direct use:

 <gm:field label="HERE"> <b>Try this!</b> </gm:field> 

works great:

 Something HERE<br /> <b>Try this!</b> Something else<br /> 

But when I try to identify another that delegates to him:

 <py:match path="gm:input"> <gm:field label="${select('@label')}"> <input name="${select('@label')}" /> </gm:field> </py:match> 

and name it:

 <gm:input label="x"> <input type="passwd" /> </gm:input> 

The result that I see in the browser:

 <gm:field label="x"> <input label="x" /> </gm:field> 

instead:

 Something x<br /> <input label="x" /> Something else<br /> 

which I would like to see ...

I am using Genshi 0.5.1 ..

+4
source share
1 answer

Having studied the source code, I believe that this cannot be done. Apparently, nested match patterns are not supported.

0
source

All Articles