Re: Date

Ashok Malhotra wrote:
> 
> To write the schema, you would first create a simple type that restricts
> "string" with a pattern corresponding to the format discussed above.

The drawback if you do so is that all the semantic of a date type will
be lost.

This means for instance that you won't be able to constrain you type by
adding facets that work on datetypes.

In this specific case (CCYYMMDD) where the lexical space of your
datatypes is a subset of a the lexical space for xs:decimal, applying
the pattern on a decimal datatype such as xs:nonNegativeInteger instead
of applying it on xs:string would allow you to keep some of these facets
(minInclusive, minExclusive, maxInclusive and maxExclusive) and to
consider the datatype as ordered (might be useful for XPath 2.0).

Hope this helps.

Eric
> 
> All the best, Ashok
> ===========================================================
> Ashok Malhotra              <mailto: ashokma@microsoft.com>
> Microsoft Corporation
> 212 Hessian Hills Road
> Croton-On-Hudson, NY 10520 USA
> Redmond: 425-703-9462                New York: 914-271-6477
> 
-- 
See you at XTech in San Diego.
             http://conferences.oreillynet.com/cs/os2001/view/e_spkr/790
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
http://xsltunit.org      http://4xt.org           http://examplotron.org
------------------------------------------------------------------------

Received on Wednesday, 4 July 2001 09:58:40 UTC