Opened 17 years ago
Last modified 13 years ago
#8 new defect
Path expressions on match templates don't work with path segments encountered before the match directive — at Initial Version
| Reported by: | cmlenz | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Template processing | Version: | 0.6 |
| Keywords: | Cc: |
Description
Before [18], the following worked:
<div xmlns:py="http://purl.org/kid/ns#"> <span py:match="div/greeting"> Hello ${select('@name')} </span> <greeting name="Dude" /> </div>
Since [18], the patch expression “div/greeting” no longer matches because the <div> element is encountered before the py:match directive in the input. This should probably be fixed, though. One option is to keep a stack of already encountered elements in the Template._match filter and push them into the path evaluator so that it has the correct context.
Note: See
TracTickets for help on using
tickets.
