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 9319 - [XQTS] op-numeric-divide-1
Summary: [XQTS] op-numeric-divide-1
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 NT
: P2 normal
Target Milestone: ---
Assignee: Oliver Hallam
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-25 09:29 UTC by Michael Kay
Modified: 2010-04-06 13:06 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2010-03-25 09:29:32 UTC
With the results as given, a product that returns an integer as the result of (1 div 1), or of (2.0 div 2.0), fails the test.

The language rules for such cases say that the result must be an instance of xs:decimal; they do not say that it cannot also be an instance of xs:integer. The general rule is that where a function is required to return a value of type T, is is permissible to return a value annotated with a subtype of T if the value is in the value space of the subtype. The test should be changed so that where the result is an xs:decimal and is a whole number, returning an instance of xs:integer is acceptable.
Comment 1 Oliver Hallam 2010-04-06 13:06:38 UTC
I have changed the denominator so that division no longer returns integer valued results, hence the result should always be a decimal.