W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2004

gDay problems in the 1.1 draft

From: Sandy Gao <sandygao@ca.ibm.com>
Date: Fri, 5 Nov 2004 12:14:03 -0500
To: www-xml-schema-comments@w3.org
Message-ID: <OF689C88C9.1916EE06-ON85256F43.005DA51F-85256F43.005EAB04@ca.ibm.com>
The working draft at [1] seems to have some errors for gDay type.

1. Lexical mapping

Consider the following 2 lexical values for type gDay:

"---01+01" "---31+01"

In the function "setDateTimeFromRaw", rawYr, rawMo, rawHr, rawMi and rawSe 
are all absent, and the defaults are used. Before applying the timezone, 
we have

{1971, 12, 1, 0, 0, 0} and {1971, 12, 31, 0, 0, 0}

for the 2 lexical values respectively. After applying the timezone 
(subtract 60 from the minute field and normalize), we have

{1971, 11, 30, 23, 0, 0} and {1971, 12, 30, 23, 0, 0}

and the last step in "setDateTimeFromRaw" is to ignore those fields that 
were absent. Now we have (including the timezone):

{absent, absent, 30, absent, absent, absent, 60} and {absent, absent, 30, 
absent, absent, absent, 60}

So the 2 obvious different lexical values give rise to the same value in 
the value space.


2. Ordering

The following example is shown in the gDay type:

---01+13:00 < ---31?13:00 

from which I assume the following is true (required by RQ-13)

---01+01:00 < ---10+01:00

But:
- Order and equality are based on the timeOnTimeLine values;
- timeOnTimeLine values are based on the (normalized) time values;
- time values don't have year, month and date properties

{absent, absent, 30, absent, absent, absent, 60} > {absent, absent, 9, 
absent, absent, absent, 60}

where the first value maps to "---01+01:00", and the second "---10+01:00", 
so we have

---01+01:00 > ---10+01:00

[1] http://www.w3.org/TR/2004/WD-xmlschema11-2-20040716/

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com
Received on Friday, 5 November 2004 17:14:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:07 GMT