W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2001

RE: Date

From: Martin Duerst <duerst@w3.org>
Date: Thu, 05 Jul 2001 17:54:00 +0900
Message-Id: <4.2.0.58.J.20010705174922.034c6100@sh.w3.mag.keio.ac.jp>
To: "Ashok Malhotra" <ashokma@microsoft.com>, "Chelkowski, Tadeusz" <Tadeusz.Chelkowski@softwareag.com>, <xmlschema-dev@w3.org>
For the type library, I was more thinking about something like

<xsd:complexType name='Date'>
   <xsd:attribute name='value' type='xsd:date'>
</xsd:complexType>

This would allow all kinds of free-form date formats, including those
that need markup. It could be restricted to a simple type with a pattern
if desired. [I have no idea whether this syntax is correct or not, sorry.]

Regards,    Martin.


At 07:01 01/07/04 -0700, Ashok Malhotra wrote:
>OK.  Here is a Schema for the element suggested by Martin
>
><xsd:element name = 'myDate'>
>    <xsd:simpleType>
>       <xsd:restriction base='xsd:string'>
>           <xsd:pattern
>value="((2[0-9][0-9][0-9])|(1[0-9][0-9][0-9]))((0[0-9])|(1[0-2]))(([0-2]
>[1-9
>])|(3[0-1]))"/>
>       </xsd:restriction>
>     </xsd:simpleType>
>     <xsd:attribute name= 'value' type='xsd:date'>
></xsd:element>
>
>All the best, Ashok
Received on Thursday, 5 July 2001 04:59:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:22 GMT