W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

Date type and patterns

From: Danny Vint <dvint@acord.org>
Date: Fri, 19 Apr 2002 18:44:47 -0400 (EDT)
Message-Id: <4.1.20020419152711.00a79788@>
To: xmlschema-dev@w3c.org
Cc: dvint@acord.org
I've been testing a schema that has an element defined as type xsd:date. 
Based upon our current specifciation we have a defintion of a date type 
defined to only have the year value required, month and day are optional 
and there should be no time information (we have a datetime type defined 
for this).
Anyway, when I have just a year value 1979 entered in a xsd:date type I get 
the following results:
1) XML Spy 4.3 reports that 1979 is not a valid date
2) MSV reports 1979 is not a valid date
3) XSV reports no problems
It looks like a date type is required to be a year month day and it has 
optional time portion that if used would make it look like a datetime type.
Please reply to the list and me off list as I don't monitor this group (as 
of yet).

After reading the Scheam spec it looks like the definition of the date type
requires a year month and day and it allows this to be changed via a
pattern like this:

         <xsd:pattern value="\d{4}(\-\d{2}(\-\d{2})?)?"/>

MSV doesn't seem to see the pattern when associated with a date type, but
if I change it to a string type it validates without a problem.

XSV reports succes in validation but it also didn't recognize the problem
before when the type was just date, so I'm not sure anything has been
helped with this change.

When can we expect to have a refernece parser that is complete and accurate
to the current version of the specs? I see we are already looking for input
for 1.1 when we still don't have a complete implementation of v1!

Who has the best and most complete parser at this point in time?


It seems that MSV 
Danny Vint
ACORD                                       1 Blue Hill Plaza 
                                            PO Box 1529 
dvint@acord.org                             Pearl River, NY 10965

FAX: 801-749-3229
Received on Monday, 22 April 2002 07:58:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:56 UTC