[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Are these two datetime values equivalent?

From: Michael Kay <mike@saxonica.com>
Date: Thu, 30 Jul 2009 17:46:37 +0100
To: "'Kevin Braun'" <kbraun@obj-sys.com>, "'Costello, Roger L.'" <costello@mitre.org>
Cc: <xmlschema-dev@w3.org>
Message-ID: <767F3B83647F4B9F84006B607BD43A76@Sealion>
RE: Are these two datetime values equivalent?
 
> >
> >    Are these equivalent:
> >
> >    2009-07-29T24:00:00-6:00
> >    2009-07-30T00:00:00-6:00
> >

They are two different lexical representations of the same xs:dateTime
value. (Just as "1" and "true" are different lexical representations of the
same boolean). So, once converted into the value space, the values they
represent are both identical and equal.

More of a problem is that 00:00:00 and 24:00:00 are also different lexical
representations of the same xs:time value, which means that in XPath you get
counter-intuitive results for xs:time('24:00:00Z') > xs:time('23:59:59Z').

Kevin Braun> > 24 isn't a valid hour (see part 2, D.2.1)

D.2.1 (of XSD 1.1 part 2) is discussing the value space, not the lexical
space.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
Received on Thursday, 30 July 2009 16:47:19 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.