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 26825 - parse-ietf-date-6
Summary: parse-ietf-date-6
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Liam R E Quin
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-16 22:02 UTC by Michael Kay
Modified: 2014-12-04 03:05 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2014-09-16 22:02:55 UTC
This test reads:

<test-case name="parse-ietf-date-6">
      <description>long fractional seconds</description>
      <created by="Liam R E Quin" on="2014-08-22"/>
      <!--* XSD implementations must support milliseconds in dateTime objects.
          * We don't specify whether parse-ietf-date() must do the same, but
	  * since it returns a dateTime object that seems a resonable
	  * interpretation.  Greater precisions is permitted. Hwere all we care
	  * about is that it's not an error and that the rounding is the same
	  * in both cases.
	  *-->
      <environment>
         <param name="d" as="xs:dateTime" select="xs:dateTime('2014-08-20T19:36:01.2999999999999999999999999999999Z')"/>
      </environment>
      <test>if (parse-ietf-date("Wed, 20 Aug 2014 19:36:01.2999999999999999999999999999999 GMT") = $d)
	  then "pass"
	  else "fail"</test>
      <result>
         <assert-string-value>pass</assert-string-value>
      </result>
   </test-case>

Implementations are only required to support three digits of fractional seconds, and the effect when you supply more than this isn't well defined in the spec. At the very least, we shouldn't do it without a dependency.

Furthermore, things that are processor-dependent should never be defined except in the query-under-test, because it's assumed that all the metadata can be processed in order to determine the test dependencies. So as a first step in fixing this I'm going to move the questionable cast operation into the query.
Comment 1 Liam R E Quin 2014-12-04 03:05:48 UTC
I've reduced the precision to 3 digits; we don't need (in this test suite) to test implementation-dependent precision.