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 

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

   <xs:simpleType name="datetimeTZ">
         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:list itemType="datetimeORduration"/>

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

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

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 Gregg
TIBCO Software, Inc.
Received on Monday, 19 May 2003 08:46:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:12 UTC