users@jaxb.java.net

default values

From: mike gabelmann <mike.gabelmann_at_krucible.com>
Date: Sun, 02 Mar 2003 16:41:02 -0800

I have created a schema for JAXB that defines elements with default values.
When I compile this schema and try to use it the default values are not
used, or if they are used the wrong ones are.

        <xsd:element name="thumb_width" type="xsd:int" default="100"/>
        <xsd:element name="thumb_required" type="xsd:boolean" default="true"/>

I get back something like:
        <thumb_width>0</thumb_width>
        <thumb_required>false</thumb_required>

instead of:
        <thumb_width>100</thumb_width>
        <thumb_required>true</thumb_required>

Do I need to do something specific to set default properties?

thanks in advance.



PS: if anyone is having trouble installing the JAXB1.0 install (JWSD-1.1)
off of Suns site under *nix try adding a line to your hosts file like this:

        127.0.0.1 mymachine.mydomain.xxx mymachine

This worked for me. I dont know why the installer needs to check the
network, but it does.