users@jaxb.java.net

Re: format of decimal

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 09 Jun 2003 08:22:02 -0700

David Rosenstark <david.rosenstark_at_corp.idt.net> wrote:
> 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?

I thought the default binding for decimal is BigDecimal. How do you
set a double value?

regards,
--
Kohsuke Kawaguchi                  408-276-7063 (x17063)
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com