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 29931 - collation tests allow fallback behavior but the expected results do not
Summary: collation tests allow fallback behavior but the expected results do not
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 18:36 UTC by Josh Spiegel
Modified: 2016-10-25 14:10 UTC (History)
2 users (show)

See Also:


Attachments

Description Josh Spiegel 2016-10-11 18:36:11 UTC
A number of recently submitted UCA collation tests assume the implementation is not using the fallback behavior.  For example consider this test:

<test-case name="compare-031" covers="uca-collation" xmlns="http://www.w3.org/2010/09/qt-fots-catalog">
      <created by="Michael Kay" on="2016-09-23"/>
      <test><![CDATA[fn:compare("database", "Database", "http://www.w3.org/2013/collation/UCA?lang=en;strength=tertiary;caseFirst=upper")]]></test>
      <result>
         <assert-eq>1</assert-eq>
      </result>
</test-case>

The default value of fallback is "yes" but the expected results do not account for this:

<quote>
If the fallback parameter is present with the value no, then the implementation must either use a collation that conforms with the rules in the Unicode specifications for the requested tailoring, or fail with a static or dynamic error indicating that it does not provide the collation (the error code should be the same as if the collation URI were not recognized). If the fallback parameter is omitted or takes the value yes, and if the collation URI is well-formed according to the rules in this section, then the implementation must accept the collation URI, and should use the available collation that most closely reflects the user's intentions.
...
if it does not recognize the keyword or value then if the fallback parameter is present with the value no it should reject the collation as unsupported, otherwise it should ignore the unrecognized parameter.
</quote>

The following tests are affected:

compare-031
compare-034
compare-035
compare-037
compare-039
compare-040
compare-041
compare-043
fn-contains-32
fn-contains-33
fn-contains-34
fn-contains-36
fn-contains-38
fn-starts-with-32
fn-starts-with-33
fn-substring-after-42
fn-substring-after-43
fn-ends-with-32
fn-substring-before-42
fo-test-d3e6934
fo-test-d3e6940
fo-test-d3e6946
fo-test-d3e7085
fo-test-d3e7091
fo-test-d3e7097
fo-test-d3e7246
fo-test-d3e7252
fo-test-d3e7258
fo-test-d3e7405
fo-test-d3e7546
fo-test-d3e7552
fo-test-d3e7558 

One solution would be to set fallback=no and then allow the error as an alternate result.
Comment 1 Josh Spiegel 2016-10-11 21:19:00 UTC
Also:
collation-key-009u
Comment 2 Michael Kay 2016-10-18 16:41:47 UTC
MK suggested that a better resolution might be to mark these tests with a dependency.
Comment 3 Andrew Coleman 2016-10-20 18:34:19 UTC
The WG agreed the following resolution:

ACTION A-657-14: O'Neil to look at bug 29931 on collations to add dependencies for these tests
Comment 4 O'Neil Delpratt 2016-10-25 14:10:28 UTC
created new dependency feature= advanced-uca-fallback.

Updated text in the test-suite documentation (see running.html):

"Indicates that the test uses a UCA collation URI with the option fallback=yes (or fallback omitted), and the test results assume that the implementation has a reasonably high level of support for uca collation semantics even if it is not 100% conformant.

Unlike simple-uca-fallback these tests assume support for a wider range of uca collation features: including different collation strengths, different case ordering options and other options, such as numeric collations."

tests cases highlighted in comment #0 and #1 updated with the new dependency feature.