users@jaxb.java.net

Re: Does turning on schema validation require packaging the xsd file?

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Fri, 15 Jan 2010 20:41:20 +0100

On Fri, Jan 15, 2010 at 7:41 PM, KARR, DAVID (ATTCINW) <dk068x_at_att.com> wrote:
> In order to do schema validation with JAXB 2, do I really have to
> package the xsd file so the SchemaFactory can create a Schema I can put
> on the unmarshaller?  It seems odd to need this, as my JAXB-annotated
> classes seem to already have all the information that might be required
> to do a validation.

JAXB annotations cannot contain
- exact values of minOccurs, maxOccurs
- an indication that the schema specifies xs:choice
- any of the information stored in facets,
and probably more I can't think about right now.

But this is quite a handful, isn't iti?

-W



>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>