Hello

I am having a problem putting range restrictions on elements of types
xsd:double and xsd:float when minInclusive is 0.
 E.g. if my schema is :

<xsd:element name="left" default="0">
 <xsd:simpleType>
  <xsd:restriction base="xsd:double">
   <xsd:minInclusive value="0.0"/>
   <xsd:maxInclusive value="1.0"/>
  </xsd:restriction>
 </xsd:simpleType>
</xsd:element>

and I parse an instance doc containing:
        <left>0.000000</left>

I get an error:

Datatype error: Type:InvalidDatatypeFacetException, Message:Value '+0E+0'
must be greater than or equal to MinInclusive '0.0'

I think this problem is related to the representation of 0 in the schema. If
I set a minInclusive to -0.000000001 or something I can get close to the
correct behavior, but 0, 0.0, 0.00, +0E+0, etc all fail. This does not fail
if I use xsd:decimal instead of xsd:double or xsd:float.

Am I misusing this somehow or is this a bug?

Thanks!




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to