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 29677 - [QT3TS] map-merge-024-hof
Summary: [QT3TS] map-merge-024-hof
Status: RESOLVED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Debbie Lockett
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-31 15:08 UTC by Tim Mills
Modified: 2016-06-17 13:49 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2016-05-31 15:08:44 UTC
For the test

   <test>map:merge(map:entry("foo", 1 to 5))</test>


is the assertion

                <assert-type>function(xs:anyURI) as item()*</assert-type>


meant to be

                <assert-type>function(xs:anyAtomicType) as item()*</assert-type>

or am I missing something?
Comment 1 Debbie Lockett 2016-06-07 17:27:35 UTC
This does look odd. But the Path 3.1 spec, under 2.5.5.8 Map Test, says:

"Because of the rules for subtyping of function types according to their signature, it follows that the item type function(A) as item()*, where A is an atomic type, also matches any map, regardless of the type of the keys actually found in the map. For example, a map whose keys are all strings can be supplied where the required type is function(xs:integer) as item()*; a call on the map that treats it as a function with an integer argument will always succeed, and will always return an empty sequence."

e.g. $M instance of function(xs:anyURI) as item()* returns true() for any map $M.

So I think that if <assert-type>map(*)</assert-type> passes then so should <assert-type>function(xs:anyURI) as item()*</assert-type>
Comment 2 Tim Mills 2016-06-17 13:49:47 UTC
Strange but true.

Thanks.