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 4451 - decimal canonical mapping inconsistency
Summary: decimal canonical mapping inconsistency
Status: RESOLVED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Datatypes: XSD Part 2 (show other bugs)
Version: 1.1 only
Hardware: All All
: P2 major
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: cluster: numbers
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2007-04-05 01:57 UTC by Dave Peterson
Modified: 2008-06-07 01:19 UTC (History)
0 users

See Also:


Attachments

Description Dave Peterson 2007-04-05 01:57:06 UTC
In 3.3.3.1 we assert:

The ·canonical representation· for decimal is defined by prohibiting certain options from the Lexical Mapping (§3.3.3.1).  Specifically, the preceding optional "+" sign is prohibited.  The decimal point is required.  Leading and trailing zeroes are prohibited subject to the following:  there must be at least one digit to the right and to the left of the decimal point which may be a zero.

however, the canonical mapping algorithm says:

1.  If d is an integer, then return ·noDecimalPtCanonicalMap·(d).

So according to the canonical mapping, the canonical representation of 3 is '3', in decimal as well as the derived integer datatype.  I suspect the wording in 3.3.3.1 is in error, inherited from 1.0, but I haven't searched the WG minutes to be sure.
Comment 1 C. M. Sperberg-McQueen 2008-06-06 00:01:02 UTC
A wording proposal intended to resolve this issue is at 

  http://www.w3.org/XML/Group/2004/06/xmlschema-2/datatypes.b4395.html
  (member-only link)

The proposal changes the paragraph in question to read:

  The definition of the ·canonical representation· has the effect of
  prohibiting certain options from the Lexical Mapping (§3.3.3.1).
  Specifically, for integers, the decimal point and fractional part
  are prohibited. For other values, the preceding optional "+" sign is
  prohibited.  The decimal point is required.  In all cases, leading
  and trailing zeroes are prohibited subject to the following: there
  must be at least one digit to the right and to the left of the
  decimal point which may be a zero.

This proposal is 'speculative' in the sense that the WG has not agreed
to consider this issue, let alone how to resolve it.  It has also not had
normal editorial review.
Comment 2 C. M. Sperberg-McQueen 2008-06-07 01:19:41 UTC
The proposal reproduced in comment #1 was adopted at today's call,
with amendments to make cleear that integers, too, prohibit the
leading + in their canonical form.

DaveP, please close or reopen to indicate your satisfaction or dis-
with this resolution.