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

RE: Is +0 a nonPositiveInteger?

From: James Clark <jjc@jclark.com>
Date: Wed, 24 Apr 2002 21:22:03 +0700
To: Ashok Malhotra <ashokma@microsoft.com>, XML Schema Comments <www-xml-schema-comments@w3.org>
Message-ID: <823255999.1019683323@[]>
But if it is a user-derived simple type, then you have to inherit the 
lexical representation to value space mapping of the base type, since XML 
Schema provides no other way for a user to specify it.  As for the builtin 
derived simple types, I thought there was a principle that derivation of 
the builtin simple types works no different from derivation of user-defined 
simple types.

This seems to me to be essentially the same problem as R-89


and need fixing in the same way.

--On 24 April 2002 06:34 -0700 Ashok Malhotra <ashokma@microsoft.com> wrote:

> James:
> I have come to the conclusion that when you derive a simple type you
> should not inherit the lexical representation of the base type.  If you
> do,
> you open your self to a host of problems which we can discuss another
> time.
> Thus, simple type derivation merely gives you a new, more restricted
> value
> space.  You can then go ahead an specify a lexical space for this
> restricted
> value space and specify a mapping from the lexical to the value space.
> If you look at it this way, nonPositiveInteger has a value space
> consisting
> of 0 and the negative integers.  Its lexical space consists of 0 and
> strings of digits preceded by a minus sign.
> All the best, Ashok
> ===========================================================
> -----Original Message-----
> From: James Clark [mailto:jjc@jclark.com]
> Sent: Wednesday, April 24, 2002 3:23 AM
> To: XML Schema Comments
> Subject: Is +0 a nonPositiveInteger?
> Is +0 allowed as a nonPositiveInteger?  At the moment there's a
> contradiction. 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 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 10:19:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:59 UTC