Sorry, I didn't notice the attachment you added (unfortunately there is no email notification on adding attachments).
Anyway, in the example you correctly analyze the behavior:
If you add this line inside <py:match path="w:b">
${repr(list(select('node()')))}
...you can see that that matcher is getting transformed
input, so it never sees <w:bc> or <w:indent>, it sees
<p class="bc"> and <div class="indent">.
The current code seems to do matching strangely, where
matchers previous to the current one are run on the
select()-ed stream before it's recursively matched.
And that's indeed new behavior in the 0.5 release, and is described in the upgrade notes:
There has also been a subtle change to how py:match templates are processed: in previous versions, all match templates would be applied to the content generated by the matching template, and only the matching template itself was applied recursively to the original content. This behavior resulted in problems with many kinds of recursive matching, and hence was changed for 0.5: now, all match templates declared before the matching template are applied to the original content, and match templates declared after the matching template are applied to the generated content. This change should not have any effect on most applications, but you may want to check your use of match templates to make sure.
The downside is that I really underestimated the impact of this change (see also #244), but the upside is that the application of match templates now happens in a more controlled and deterministic fashion (see #186).
In your example, moving <py:match path="w:b"> before the other two match templates seems to fix the issue.
As noted in #244 (which I'm going to flag as duplicate), I've not decided whether this confusion needs a change in an upcoming Genshi release (which would likely just add more confusion into the mix), or whether this is going to stay as is. I guess it really depends on whether this new behavior can deal with all the cases, or whether it falls down in some cases.