This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2140 - R-149: Is +0 allowed as a nonPositiveInteger in lexical form?
Summary: R-149: Is +0 allowed as a nonPositiveInteger in lexical form?
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.0 only
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-12 15:27 UTC by Sandy Gao
Modified: 2009-04-21 19:25 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-09-12 15:27:00 UTC
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.

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0051.html
Comment 1 Sandy Gao 2005-09-12 15:34:52 UTC
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0053.html

http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0053.html

Resolution:
Discussed at the May 31 telecon. WG resolved to to classify R-149 as a 
clarification with erratum, and instruct the editors to draft an erratum fixing 
the prose.

Proposed text:
http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2002Jun/0010.html 

Final approved text may be found at:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0086.html

Erratum E2-27 added.