W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2007

[Bug 5085] K2-CeilingFunc-1 et seq

From: <bugzilla@wiggum.w3.org>
Date: Sat, 29 Sep 2007 15:35:31 +0000
To: public-qt-comments@w3.org
Message-Id: <E1IbeLp-0006fw-RS@wiggum.w3.org>


           Summary: K2-CeilingFunc-1 et seq
           Product: XML Query Test Suite
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org

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
Received on Saturday, 29 September 2007 15:40:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:20 UTC