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

fractionDigits facet

From: Ross Thompson <rthompson@contivo.com>
Date: Fri, 15 Feb 2002 07:57:53 -0800
Message-ID: <15469.12289.280594.995542@localhost.localdomain>
To: www-xml-schema-comments@w3.org

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">
  <simpleType>
    <restriction base="decimal">
      <fractionDigits value="2"/>
    </restriction>
  </simpleType>
</element>

Which of the following are legal?

<a>2.00</a>
<a>2.12</a>
<a>2.120<a>
<a>2.120000000000000000000000000000000000000<a>
<a>2.123<a>
<a>2.120000000000000000000000000000000000001<a>

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.

- Roß

---
To love a child is to belt a child.	-- Bumper sticker
Received on Friday, 15 February 2002 10:58:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:33 UTC