Edgewall Software

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 Version 2

Reported by: cmlenz Owned by: cmlenz
Priority: minor Milestone:
Component: Template processing Version: 0.6
Keywords: Cc:

Description (last modified by cmlenz)

Before [18], the following worked:

<div xmlns:py="markup.edgewall.org/">
  <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.

Change History (2)

comment:1 Changed 17 years ago by cmlenz

  • Milestone set to 0.3

comment:2 Changed 17 years ago by cmlenz

  • Description modified (diff)
Note: See TracTickets for help on using tickets.