- From: Ashok Malhotra <ashokma@microsoft.com>
- Date: Tue, 24 Dec 2002 11:17:12 -0800
- 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 UTC