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 2992 - rdb-queries-results-q8 assumes validation?
Summary: rdb-queries-results-q8 assumes validation?
Status: RESOLVED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.6
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-08 00:43 UTC by Per Bothner
Modified: 2006-03-08 18:27 UTC (History)
0 users

See Also:


Attachments

Description Per Bothner 2006-03-08 00:43:09 UTC
The query rdb-queries-results-q8.xq contains this expression:
  end_date >= xs:date("1999-03-01") and end_date <= xs:date("1999-03-31")
I don't think this correct unless the input-file has been validated - and
there doesn't seem to be a schema for TestSources/items.xml.  Without it, my rason of the spec is that end_date is cast to untypedAtomic, and then double, at which point we get an error since the end_date does parse as a double.
A fix: replace both 'end_date' expressions by 'xs:date(end_date)'.
Comment 1 Andrew Eisenberg 2006-03-08 18:27:06 UTC
I agree that rdb-queries-results-q8 involves a general comparison between a value of type xdtuntypedAtomic and xs:date. I believe that this operation is supported by XQuery in section 3.5.2, General Comparisons, which says in part:

2) The result of the comparison is true if and only if there is a pair of atomic values, ...
c) If one of the atomic values is an instance of xdt:untypedAtomic and the other is not an instance of xs:string, xdt:untypedAtomic, or any numeric type, then the xdt:untypedAtomic value is cast to the dynamic type of the other value.


Please close this bug if you agree with this interpretation of the spec.