W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

make datetime tuples real types

From: Xan Gregg <xan@tibco.com>
Date: Mon, 19 May 2003 08:30:16 -0400
To: public-qt-comments@w3.org
Message-Id: <A535DD9C-89F5-11D7-8CFF-003065FB861A@tibco.com>

Introducing a new structure, datetime tuples, to capture the info you 
want for datetime types is a good idea, but why not use a real, named 
XML Schema type, as is done for duration?  Of course, it's not 
completely analogous because the value space is expanded by the tuple 
rather than restricted as is the case for the new duration types. The 
tuple seems too magical when there are more transparent options 
available.

Here is a simpleType that captures (a superset of) the value space for 
the tuple.

   <xs:simpleType name="datetimeTZ">
     <xs:annotation>
       <xs:documentation>
         A "list" of a datetime/duration union with the convention
         that list always has two items: the first item is a datetime
         and the second item is a duration.
       </xs:documentation>
     </xs:annotation>
     <xs:list itemType="datetimeORduration"/>
   </xs:simpleType>

   <xs:simpleType name="datetimeORduration">
     <xs:union memberTypes="xs:datetime xs:duration"/>
   </xs:simpleType>

Most datetime F&O functions would operate on xdt:datetimeTZ instead of 
xs:datetime, just as functions operate on xdt:*Duration instead of 
xs:duration.

While there is a lexial representation for datetimeTZ (as a two-value 
list), F&O or FS would define functions/casts to convert datetimeTZ to 
the timezoned datetime lexical representation and back.

I'm sure the WG has been round and round on this issue, but in case you 
have considered the above option, please do.

xan

Xan Gregg
TIBCO Software, Inc.
www.tibco.com
Received on Monday, 19 May 2003 08:46:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT