Bug 20271 - [XT30] QualifiedPattern priority
Summary: [XT30] QualifiedPattern priority
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: https://www.w3.org/XML/Group/qtspecs/...
Depends on:
Reported: 2012-12-06 12:07 UTC by Tim Mills
Modified: 2012-12-06 12:59 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2012-12-06 12:07:19 UTC
The rules in "6.5 Default Priority for Template Rules" do not have rules for QualifiedPatterns.

I expect that a match rule such as

((a | b) except c) | (e | f) intersect d)

will have to be treated as multiple rules:

a except c
b except c
e intersect d
f intersect d

each receiving their own priority.
Comment 1 Michael Kay 2012-12-06 12:37:04 UTC
It's covered by the fallback rule which says all other cases have default priority +0.5.

The question is whether we can do better than that. Making the rules smarter is not necessarily a good thing to do if it makes them less predictable. 

The current rule that treats a union pattern as if there were two separate template rules with different priority is legacy. It's not obvious how to extend this idea. Logically (A intersect B) should have a priority that is higher than that of A or B, but lower than (A intersect B intersect C). I think it just gets too difficult and you have to draw the line somewhere; I think the simple guidance to users should be "for simple NodeTests, the default priority is useful; for anything else, use explicit priorities".
Comment 2 Tim Mills 2012-12-06 12:59:06 UTC
Thanks for the explanation.