W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Re: Q: Please clarify pattern constraint on date/time

From: <petsa@us.ibm.com>
Date: Mon, 10 Jan 2000 14:46:17 -0500
To: "Randy Waldrop" <rwaldrop@webmethods.com>
cc: www-xml-schema-comments@w3.org
Message-ID: <85256862.006C9BFF.00@D51MTA03.pok.ibm.com>
Thank you for your note.

You can only use the patterns that are legal for XML Schema i.e.
the patterns defined in the spec.

Yes, more examples would help the spec.  Paul and fully intend
to add some.

All the best, Ashok

"Randy Waldrop" <rwaldrop@webmethods.com>@w3.org on 01/06/2000 12:21:48 PM

Sent by:  www-xml-schema-comments-request@w3.org

To:   <www-xml-schema-comments@w3.org>
Subject:  Q: Please clarify pattern constraint on date/time

The 17 December 1999 Draft of "XML Schema Part 1: Structures"

> pattern
> For subtypes of the date and time related types (timeInstant
> (3.2.6), timeDuration (3.2.7), recurringInstant (3.2.8),
> date (3.3.18) and time (3.3.19)), pattern can be used to
> constrain the allowable values using IS0 8601 "pictures".

Which one of these does the spec mean to convey:
(1) the pattern must match a valid ISO8601 format, or
(2) the pattern can express new formats outside of those in

If either (1) or (2), the following patterns are OK:

If (2), the following patterns are also OK:
  MM-DD-YY             (different order)
  CCYY/MM/DD           (different separator)
  CCYY-MM-DD hh:ss     (space rather than "T" separator)

Also, must the pattern be match exactly or only have an
equivalent value.  For example in ISO8601 some of the
separators are optional.  What if they are present in the
pattern and absent in the instance data?  What if the pattern
specifies "CCYYMM" and the instance data has all of that, but
also has more (such as "DD")?

Some examples in the spec would be very helpful.

Thanks, Randy
Received on Monday, 10 January 2000 14:46:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:46 UTC