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

Is +0 a nonPositiveInteger?

From: James Clark <jjc@jclark.com>
Date: Wed, 24 Apr 2002 17:22:52 +0700
Message-ID: <00e701c1eb79$fe672fb0$3500a8c0@bkk.thaiopensource.com>
To: "XML Schema Comments" <www-xml-schema-comments@w3.org>
Is +0 allowed as a nonPositiveInteger?  At the moment there's a
contradiction. 3.3.14.1 says "nonPositiveInteger has a lexical
representation consisting of a negative sign ("-") followed by a
finite-length sequence of decimal digits (#x30-#x39). If the sequence of
digits consists of all zeros then the sign is optional."  This doesn't allow
+0.  On the other hand 0 is in the value space of nonPositiveInteger and +0
is a legal representation of ) in the lexical space of integer.

Either

(a) the prose in 3.3.14.1 needs fixing, or

(b) the schema for schema needs to add a pattern facet to the definition of
nonPositiveInteger that excludes +0

If you do (b), then you will probably want to fix nonNegativeInteger to
disallow "-0". However, at the moment there's no contradiction since the
prose for nonNegativeInteger allows "an optional sign" not just an optional
positive sign.

James
Received on Wednesday, 24 April 2002 06:22:57 GMT

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