id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 77,Match templates can match their own output,dackze+genshi@…,cmlenz,"This is really hurting my head and I'm not exactly sure how to explain this, so here are some examples: {{{ #!xml

${select('text()')} Goodbye!

Hello!

}}} Produces: {{{ #!xml

Hello! Goodbye! Goodbye!

}}} It seems to be triggered by the first match template outputting what the second match template matches, ''and'' by the name of the second match template matching its own query. If you make the first match template not output the `

Hello

` element, or change the `

` element to not match its own query, the problem disappears. I'm not sure if this is intentional, but for what it's worth, Kid doesn't seem to behave this way: {{{ #!xml

${item.text} Goodbye!

Hello!

}}} Produces: {{{ #!xml

Hello! Goodbye!

}}} The examples are contrived, but I originally ran into this with a form template that filled in fields via match templates. I had a match template that put error messages beneath fields with invalid input, and when I threw a match-based layout template into the mix, I started getting two of each error list. Also, this seems to happen in all of the current branches, the current trunk, and all of the 0.3 tags.",defect,closed,major,0.3.5,Template processing,devel,fixed,,