Draft for review: ISO 8601 date work on IS 29500

Chris Rae Chris.Rae at microsoft.com
Thu Jul 8 20:16:12 CEST 2010


Hi Rick - first off, many thanks indeed for taking the time to look at this. Very much appreciated. Gareth and I just talked about this for an hour on the phone, and we had a couple of questions.

First off, our dateTime type is indeed a subset of xsd:dateTime, (it's basically xsd:dateTime without time zones). Likewise, our date and time types are also subsets of the equivalent xsd types.

There is a stumbling block though: Because of the multi-purpose nature of cell values, the date must go in an attribute of type string. Is it possible for us to have a string which, in certain circumstances, is a restriction of xsd:dateTime? It was our understanding that this couldn't be done, but neither of us are XML wizards so any thoughts much appreciated. 

If we can find a way of getting an xsd:dateTime restriction into a string, would we be right in thinking it would look something like:

<xsd:simpleType name="datetime">
  <xsd:restriction base="xsd:dateTime">
     <xsd:pattern value=".+T[^Z+-]+" /> 
  </xsd:restriction>
</xsd:simpleType>

We'd obviously need separate ones for date and time, but we wanted to check we were headed in the right direction first.

Chris

-----Original Message-----
From: rjelliffe at allette.com.au [mailto:rjelliffe at allette.com.au] 
Sent: 07 July 2010 22:26
To: Chris Rae
Cc: e-SC34-WG4 at ecma-international.org; Horton, Gareth
Subject: Re: Draft for review: ISO 8601 date work on IS 29500

> Hi all - Gareth and I think we have got something to the point where 
> it can be reviewed by WG4. However - this is an early draft. The main 
> areas of interest should be, I think, the line items in 
> "introduction". That summarises the work that we've tried to effect in this draft.

I think it would be useful to

1) confirm that the 8601 date-time subset being used is also a subset of W3C XML Schemas dateTime  datatype, and then, if it is

2) express the date constraints in 18.17.4 in terms of W3C XML Schemas rather than ISO 8601. (Some subset might still be required.)

If the date format allows things not in XSD dateTime, it will not play well in the general XML ecosystem, which goes against the point. XSD Datatypes is more available to developers, and it in turn references ISO 8601.

Cheers
Rick



More information about the sc34wg4 mailing list