xsd:fractionDigits
-
I write:
<xsd:simpleType name="money">
<xsd:restriction base="xsd:decimal">
<xsd:fractionDigits value="2" />
</xsd:restriction>
</xsd:simpleType>to define a simple type in a schema file. Then i use
<cost>239.00</cost>
in an XML file, wherecost
is of typemoney
. When i try to validate the XML with MSXML 4.0 it generates this error:The element cost has an invalid value according to its data type
. If i remove the 9 from 239.00 everything will be ok. What's wrong here? MSXML 4.0? The case comes from an XML-Schema tutorial rechi -
I write:
<xsd:simpleType name="money">
<xsd:restriction base="xsd:decimal">
<xsd:fractionDigits value="2" />
</xsd:restriction>
</xsd:simpleType>to define a simple type in a schema file. Then i use
<cost>239.00</cost>
in an XML file, wherecost
is of typemoney
. When i try to validate the XML with MSXML 4.0 it generates this error:The element cost has an invalid value according to its data type
. If i remove the 9 from 239.00 everything will be ok. What's wrong here? MSXML 4.0? The case comes from an XML-Schema tutorial rechi -
The wrote: The answer is xsd:restriction base="xsd:decimal" :confused: sounds like :beer: time... rechi
-
I write:
<xsd:simpleType name="money">
<xsd:restriction base="xsd:decimal">
<xsd:fractionDigits value="2" />
</xsd:restriction>
</xsd:simpleType>to define a simple type in a schema file. Then i use
<cost>239.00</cost>
in an XML file, wherecost
is of typemoney
. When i try to validate the XML with MSXML 4.0 it generates this error:The element cost has an invalid value according to its data type
. If i remove the 9 from 239.00 everything will be ok. What's wrong here? MSXML 4.0? The case comes from an XML-Schema tutorial rechi -
I've tried. Same story. But it's not unusual. I had a problem with the
pattern
facet also. Guess MSXML has to grow up a bit. If you need the sources i can send them to you. rechi