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 29922 - [qt3ts] fn-transform-45
Summary: [qt3ts] fn-transform-45
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-07 10:50 UTC by Michael Kay
Modified: 2016-10-07 15:23 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2016-10-07 10:50:52 UTC
The test in its current form contains two mutually-contradictory assertions:

<assert>not(map:contains($result, "output"))</assert>
<assert>$result("output") instance of xs:string</assert>

In addition, the assertion 

contains(map:keys($result), 'fn-transform-45.xml')

is highly dubious because contains() expects a single string and map:keys() delivers a sequence of atomic values.

The result map actually contains a single entry whose key is something like

"file:/Users/xxxx/yyyy/QT3-test-suite/fn/transform/sandbox/fn-transform-45.xml"

which will vary from machine to machine. The previous version of the test used $result?* to access the entry regardless of its key, but this was changed to avoid use of XPath 3.1 syntax. I think we can achieve the same effect, given that it is a singleton map, using $result(map:keys($result)[1])
Comment 1 Michael Kay 2016-10-07 10:58:46 UTC
I have taken the liberty of fixing this.
Comment 2 Abel Braaksma 2016-10-07 15:23:36 UTC
I'm curious how my driver passed this test (which is why I thought I could commit it). It looks like it incorrectly assessed the multiple assertions (error in test driver). I will have to run the tests again to find out whether other tests showed false positives as well.