This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30110 - Test-cases match-06[3|4] make wrong assumptions about pattern priority
Summary: Test-cases match-06[3|4] make wrong assumptions about pattern priority
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2017-05-12 15:37 UTC by johnlumley
Modified: 2017-05-12 16:19 UTC (History)
1 user (show)

See Also:


Description johnlumley 2017-05-12 15:37:17 UTC
In the test cases match-063 and match-064, both contain (the same) two templates with match patterns: 

<xsl:template match="foo except /*/*">
<xsl:template match="foo">...

The tests are written on the assumption that the first pattern has a higher default priority than the second, presumably anticipating the 'catchall' of +0.5. 

However states:

  "If the top-level pattern is an IntersectExceptExprP containing two or more PathExprP operands separated by intersect or except operators, then the priority of the pattern is that of the first PathExprP."

so the first pattern should have the same priority as the second, and the 'select the last matching' behaviour will not produce the desired results.
Comment 1 Michael Kay 2017-05-12 16:19:57 UTC
Fixed by changing the order of the template rules.