Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: Are these two datetime values equivalent? [Thread Next] Re: Are these two datetime values equivalent?To: Michael Kay <mike@--------.---> Date: 7/30/2009 5:03:00 PM D.2.2 discusses the lexical space:
/hourFrag/ ::= ([|01|] /digit/
<http://www.w3.org/TR/xmlschema11-2/#nt-digit>) | ('|2|' [|0-3|])
On 7/30/2009 12:46 PM, Michael Kay wrote:
>
>
>>> 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
>
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
