Re: fractionDigits facet


     I sent the following to the Schema comments mailing list a few weeks 
ago, but never saw it in the archives, so I thought I'd better send it 
again.  My apologies if anyone sees this twice.


Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044

----- Forwarded by Henry Zongaro/Toronto/IBM on 02/03/06 09:59 AM -----

Henry Zongaro
02/02/21 06:30 PM

        From:   Henry Zongaro/Toronto/IBM@IBMCA
        Subject:        Re: fractionDigits facet


Hi Ross,

     In [4] you wrote:
Until yesterday's WG phone call, I thought that fractionDigits was a
constraint on the lexical space.  This made sense to me, and I knew
how to operationalize it.  I learned yesterday that it is a constraint
on the value space, and I now have no clear understanding from the
spec about what would validate against the following type:

<element "a">
    <restriction base="decimal">
      <fractionDigits value="2"/>

Which of the following are legal?


My guess is that the last two are illegal, and the others are all ok.
My suggestion is that the spec spell this out better in the
description of the 'fractionDigits' facet, perhaps with an example
similar to mine.

     I tripped across this a few weeks ago, but I came to the conclusion 
that fractionDigits constrains both the lexical space and the value space. 
 If you look at the definition of the lexical representation of decimal in [1], it states, in part, that "if fractionDigits is specified, the 
number of digits following the decimal point must be less than or equal to 
the fractionDigits."  That indicates to me that only the lexical values 
2.00 and 2.12 would meet the requirements of the fractionDigits facet of 
your example type.

     However, the description of the fractionDigits facet in 4.3.12 [2] 
doesn't mention that it constrains the lexical space in this way, i.e., by 
prohibiting excess trailing digits, including zeroes.  Contrast that with 
the description of the pattern facet in 4.3.4 [3] which explicitly states 
that it constrains the value space by constraining the lexical space.

     It's no longer clear to me whether the difference in style between 
4.3.12 and 4.3.4 means that it wasn't intended that fractionDigits should 
constrain the lexical space in this way (and that is incorrect), 
or that it is merely a difference in style.  Does anyone know what was 


Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044

Received on Wednesday, 6 March 2002 10:04:12 UTC