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 27140 - [xslt3ts] match-144
Summary: [xslt3ts] match-144
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-23 10:15 UTC by Michael Kay
Modified: 2015-05-06 21:16 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2014-10-23 10:15:31 UTC
In test match-144 there are two template rules that match the same node:

<xslt:template match="element(*, pre:partNumberType)">

and

<xslt:template match="element(*, pre:partIntegerUnion)">

This is because partIntegerUnion is a union type with partNumberType as one of its members.

The test results are assuming that pre:partNumberType will match. But in fact the match is ambiguous, so the later rule in document order should be taken.

This test demonstrates an incompatiblity between 3.0 and 2.0, caused by changes to the handling of unions in the XPath 3.0 type rules.

I propose to resolve it by adding priorities to the rules.
Comment 1 Michael Kay 2014-10-23 10:18:22 UTC
Also affects tests match-145, match-164, and match-169. Possibly also, subject to confirmation, match-211.
Comment 2 Michael Kay 2014-10-23 12:11:34 UTC
The situation with match-211 is (as suspected) different. I think the expected results are correct; Saxon was getting them wrong because of a bug (failing to recognize a Union type V as being derived-from U when V is derived from U by restriction.)
Comment 3 Michael Kay 2015-03-20 15:19:15 UTC
I believe these tests have been fixed in cases where a fix was needed.
Comment 4 Abel Braaksma 2015-05-06 21:16:28 UTC
Was resolved > 30 days ago, closing.