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 29405 - [QT3] K-CodepointToStringFunc-8
Summary: [QT3] K-CodepointToStringFunc-8
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Linux
: 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-01-29 23:46 UTC by Benito van der Zander
Modified: 2016-04-29 08:21 UTC (History)
4 users (show)

See Also:


Attachments

Description Benito van der Zander 2016-01-29 23:46:32 UTC
The test K-CodepointToStringFunc-8 calls codepoints-to-string(8) and             accepts <assert-string-value>&amp;#x8;</assert-string-value>

But that string seems doubly escaped. &#x8; alone would escape a single 8 codepoint character
Comment 1 Abel Braaksma 2016-01-30 01:51:32 UTC
I agree that the assert-string-value is incorrect and since the XML document containing the test is XML 1.0 it cannot be made correct. 

I think the test should probably be split in two: 

1) one with an XML 1.1 dependency with an XPath test like string-to-codepoints(.) = 8, or a serialization-matches test.

2) and one without the XML 1.1 dependency testing for FOCH0001.

Possibly the test typically succeeds most of the time because XML 1.0 is used with processors unless the dependency is set in the test. In such cases the FOCH0001 should always throw.
Comment 2 Benito van der Zander 2016-01-30 09:57:49 UTC
>2) and one without the XML 1.1 dependency testing for FOCH0001.

And with an XML 1.0 dependency
Comment 3 Abel Braaksma 2016-01-30 21:38:55 UTC
> And with an XML 1.0 dependency
Such dependency does not exist, it is a minimum requirement to support XML 1.0.
Comment 4 Benito van der Zander 2016-01-31 19:43:33 UTC
There is one:

<dependency type="xml-version" value="1.0"/>
Comment 5 Abel Braaksma 2016-01-31 23:20:18 UTC
(In reply to Benito van der Zander from comment #4)
> There is one:
> 
> <dependency type="xml-version" value="1.0"/>
Interesting. I just did a search and it is used 40x. Funny, never noticed it before. Looking at those tests I see how it is supposed to have meaning (i.e., should run on 1.0, not 1.1), though the more logical choice imho would be:

<dependency type="xml-version" value="1.1" satisfies="false"/>

Tx for pointing that out and sorry for the clutter...
Comment 6 O'Neil Delpratt 2016-04-19 12:04:26 UTC
I have split the tests according to comment #1.
Comment 7 Tim Mills 2016-04-20 13:26:51 UTC
Would there be an objection to testing the result without using seialization-matches, as this test isn't really about serialization?

For historical reasons, in our test harness we compare using canonical XML (as per the old XQTS), which happens not to escape this character.

I fear if we change our test harness, we may end up having to file bug after bug about whitespace.
Comment 8 Michael Kay 2016-04-20 13:44:53 UTC
Yes it's always good practice to avoid using serialization-matches assertions except when you're actually testing serialization.
Comment 9 Michael Kay 2016-04-26 21:34:58 UTC
Changed the expected result to

<assert>string-to-codepoints($result) eq 8</assert>
Comment 10 Tim Mills 2016-04-28 08:11:24 UTC
Now updated.
Comment 11 Josh Spiegel 2016-04-28 18:44:30 UTC
I still see:

   <test-case name="K-CodepointToStringFunc-8a">
       ...
       <assert-string-value>&#8;</assert-string-value>

I am changing it to:

       <assert>string-to-codepoints($result) eq 8</assert>

Currently I am unable to parse the catalog file with my 1.0 parser.
Comment 12 Tim Mills 2016-04-29 08:21:08 UTC
(In reply to Josh Spiegel from comment #11)
> Currently I am unable to parse the catalog file with my 1.0 parser.

Sorry Josh - thanks for fixing it.