make datetime tuples real types

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 UTC