Hi,
Can someone tell me what I'm doing wrong with the following...
xsd snippet:
<xsd:element name="price">
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="8"/>
<xsd:fractionDigits value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Beans and descriptors are generated using SourceGenerator. The price
element is mapped as a BigDecimal (inside the descriptor). Inside my
code, I set the bean (price) to a double value that I extract from a
database... no problems there. Well if the value is something like
478.123456789, during marshalling, it does not validate, saying the
totalDigits should not exceed 8.
OK, that makes sense. But I was under the assumption that code would be
generated by SourceGenerator to take care of this, given the schema is
used to generate the code. Am I wrong? It says on the website that
castor supports decimals with totalDigits and fractionDigits, but is
that only for unmarshalling?
Thanks
Tony Vann
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user