users@jaxb.java.net

format of decimal

From: David Rosenstark <david.rosenstark_at_corp.idt.net>
Date: Mon, 09 Jun 2003 17:58:30 +0300

I am having trouble with the following.

I have xml defined to allow only 2 decimal places:
<xs:simpleType name="AmountType">
                <xs:restriction base="xs:decimal">
                        <xs:totalDigits value="6"/>
                        <xs:fractionDigits value="2"/>
                </xs:restriction>
</xs:simpleType>

When i pass a double to this, the resulting XML does not enforce this. What
am i doing wrong?