Test 447

I am unclear as to whether Test 447 is incorrect, or my implementation of catch matching is incorrect.
The following is the chain of events in my interpreter:
1) A "event.punc.question" event is thrown.
2) Event counts for "event", "event.punc" and "event.punc.question" are incrmented to 1.
3) The handler <catch event="event.punct.question" count="1"> is selected
4) A "event.punc.exclamation" is thrown.
5) Event counts for "event", "event.punc" are incremented to 2, and "event.punc.exclamation" is incrmented to 1.
6) The handler of <catch event="event" count="2"> is selected because "event" is a prefix match of "event.punc.exclamation", and the event count for "event" is 2.
The test expects that step 6 should have selected <catch event="event.punc.exclamation" count="1">.  However, the spec states to select the handler with the highest count less than or equal to the "current count".  If "current count" in the last case is "event", then the correct handler was selected (and the test is wrong).  If "current count" is 1, then I am using the wrong count.
However, if "current count" is 1, then why are we required to maintain counts for each sub-element of an event?  i.e., "event.punct.exclamation", "event.punct" and "event".

Received on Wednesday, 7 May 2003 10:00:19 UTC