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 5085 - K2-CeilingFunc-1 et seq
Summary: K2-CeilingFunc-1 et seq
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
: 5086 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-29 15:35 UTC by Michael Kay
Modified: 2007-10-02 09:51 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-09-29 15:35:25 UTC
Affected Tests:

K2-CeilngFunc-1 to -12
K2-FloorFunc-1 to -12
K2-RoundFunc-1 to -12
K2-RoundEvenFunc-17 to -22

These tests take the form

ceiling(xs:unsignedShort(3)) instanceof xs:unsignedShort

and expect the answer false. I believe this is an incorrect reading of the spec.  The spec says "If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type." But if ceiling(xs:unsignedShort(3)) returns the unsignedShort 3, then this condition is satisfied, because the unsignedShort 3 is indeed an instance of "the base numeric type" (which I assume is intended to mean xs:integer).

As a general rule, if a function is required to return a value of type T, then a value of any subtype of T is acceptable.

Michael Kay
Comment 1 Michael Kay 2007-09-29 15:46:56 UTC
*** Bug 5086 has been marked as a duplicate of this bug. ***
Comment 2 Michael Kay 2007-09-29 15:48:23 UTC
Also affects K2-AbsFunc-39
Comment 3 Frans Englich 2007-10-02 09:51:03 UTC
A fix has been attempted in CVS, XQTS_current.zip is updated.

If the resolution is satisfactory, feel free to change status to closed. Otherwise reopen this report. If no feedback is given within two weeks, status will be set to closed.