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 28063 - [QT3] map/put/put-003
Summary: [QT3] map/put/put-003
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: 2015-02-20 15:09 UTC by Michael Kay
Modified: 2015-04-21 15:48 UTC (History)
2 users (show)

See Also:


Attachments

Description Michael Kay 2015-02-20 15:09:05 UTC
Test case map/put/put-003 returns a map and asserts:

<assert-type>function(xs:string) as xs:integer*</assert-type>

But the spec says in 2.5.5.8: "The function signature of the map, treated as a function, is always function(xs:anyAtomicType) as item()*, regardless of the actual types of the keys and values in the map. This means that a function item type with a more specific return type, such as function(xs:anyAtomicType) as xs:integer, does not match a map in the sense required to satisfy the instance of operator."

So this assertion should be false.
Comment 1 Michael Kay 2015-02-20 16:01:34 UTC
Also affects: 

map-merge-003
map-entry-001
Comment 2 Debbie Lockett 2015-02-27 15:53:58 UTC
Changed these tests (map-put-003, map-merge-003, map-entry-001) to expect false for the offending assertions relating to the function signature. 

Also added new tests (map-put-002, map-merge-024, map-entry-007), adaptions of the above, which instead assert function signatures with return type "as item()*".
Comment 3 Christian Gruen 2015-03-19 15:06:29 UTC
I just saw that the three new QT3TS test cases are using a "not" assertion. I did not find this assertion documented somewhere. Is it planned to include this assertion, or would it rather make sense to update the test cases?
Comment 4 Michael Kay 2015-03-19 15:29:38 UTC
I think this usage probably drifted across by accident from the XSLT 3.0 test suite, where it was found particularly useful for serialization tests:

<not>
  <serialization-matches>standalone</serialization-matches>
</not>

which is hard to achieve any other way.

But it's not needed for these particular tests.

Of course, if we use it then it should be in the schema. Do you have any objection to adding it?
Comment 5 Christian Gruen 2015-03-19 15:43:07 UTC
> Do you have any objection to adding it?

I'd be fine with it. Thanks.
Comment 6 O'Neil Delpratt 2015-04-21 15:48:37 UTC
Schema has been fixed by Mike accordingly to comment 4. 
Marking bug as resolved.