users@jaxb.java.net

minOccurs=maxOccurs=0 produces empty interface -- bug or feature?

From: jon gold <dev_at_samizdatdigital.org>
Date: Thu, 31 Mar 2005 17:53:53 -0800

i recently made a typo in a schema and accidentally set both minOccurs
and maxOccurs equal to 0 for an element in a sequence of a complexType,
let's say:

<complexType name="FooType">
        <sequence>
                <element name="x" type="string"/>
                <element name="y" type="string"
                         minOccurs="0" maxOccurs="0"/>
        </...
</...

and got an empty interface for FooType -- ie, no methods getX or setX,
even though they were defined to exist. is this a feature of schemas or
of xjc, or is it a bug?


jon