W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2002

RE: Editorial comment: E2-23 confuses values with lexical representations

From: Ashok Malhotra <ashokma@microsoft.com>
Date: Tue, 24 Dec 2002 11:17:12 -0800
Message-ID: <E5B814702B65CB4DA51644580E4853FB03DA77B9@red-msg-12.redmond.corp.microsoft.com>
To: "Steven Taschuk" <staschuk@telusplanet.net>, "W3C XML Schema Comments list" <www-xml-schema-comments@w3.org>

> Integers, of course, do not conform to patterns; strings do.  

Not so!  The pattern facet can be used to restrict all datatypes.

All the best, Ashok

-----Original Message-----
From: Steven Taschuk [mailto:staschuk@telusplanet.net] 
Sent: Tuesday, December 24, 2002 10:29 AM
To: W3C XML Schema Comments list
Subject: Editorial comment: E2-23 confuses values with lexical
representations





	The values of the Year, Month, Day, Hour and Minutes
	components are not restricted but allow an arbitrary
	unsigned integer i.e. an integer that conforms to the
	pattern [0-9]+.                       [erratum E2-23]

Integers, of course, do not conform to patterns; strings do.  (Or
at least, the sense of "match" in which integers match patterns is
not defined in section 1.4.)

Imho, what is needed here (and elsewhere) is something along the
lines of:

	The Year, Month, Day, Hour and Minutes components are
	values of type nonNegativeInteger.  The Seconds
	component is a value of type decimal.

The recommendation already takes this approach in certain places,
e.g., in the definition of facets.  The benefit, of course, is
that all the fiddly bits -- whether leading zeroes are allowed,
whether digits are required before/after the decimal point, etc.
-- can be dealt with in a single place in the document.

-- 
Steven Taschuk           |   ,\
staschuk@telusplanet.net | }<__`O=
                          |  '  "     Pleiosaur 
Received on Tuesday, 24 December 2002 14:17:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:01 GMT