W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2005

Re: Date in xml schema

From: Xan Gregg <xan.gregg@jmp.com>
Date: Thu, 14 Apr 2005 14:50:33 -0400
Message-Id: <c15e53385ce8af359b8df782706a74b8@jmp.com>
Cc: rafael.joia@datasus.gov.br
To: www-xml-schema-comments@w3.org

> the date datatype (type="xs:date") in schema definition supports only
> "YYYY-MM-DD" format but I need to have my date in "DD/MM/YYYY"(Brazil
> format) format. Is this possible in schema 1.0? If no, i think that is
> must be part of requirements of new version(1.1). Please, i'm waiting a
> reply...

XML Schema 1.0 only supports a subset of the ISO-8601 date/time formats 
as you observe, and there are apparently no plans to change that 
(looking at the latest 1.1 Working Drafts and at the 1.1 Requirements 
document [1]).

The usual alternative is to derive a new type from xs:string and use a 
pattern facet to restrict the format.  The downside is that the type is 
a string instead of a date, so it can't support date-aware min/max 
restrictions, for instance.

The requirements document is only a Working Draft, so technically it is 
not too late to file comments on it (to this mailing list), but my 
sense is that the requirements are effectively closed.

xan

[1] http://www.w3.org/TR/2003/WD-xmlschema-11-req-20030121/#N4002A9
Received on Thursday, 14 April 2005 18:50:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 October 2007 06:13:36 GMT