users@jaxb.java.net

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

From: Perry, Steve <Steve.Perry_at_fnf.com>
Date: Fri, 1 Apr 2005 10:41:38 -0600

Maybe, if something can never occur, what's the point in generating code
for it?

> -----Original Message-----
> From: jon gold [mailto:dev_at_samizdatdigital.org]
> Sent: Thursday, March 31, 2005 7:54 PM
> To: users_at_jaxb.dev.java.net
> Subject: minOccurs=maxOccurs=0 produces empty interface -- bug or
feature?
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net