users@jaxb.java.net

Re: Restriction parameter from schema to class annotation.

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 17 Oct 2007 14:04:16 +0200

Hi.

> What would you expect this annotation to achieve? The validation is
> handled by the Schema object during (un)marshaling. Or do you mean this
> would be purely for documentation purposes?
>
>
> Michał Letyński wrote:
> > Hello.
> > Is is possible to force JAXB to get information about restriction in
> > generated class for e.g:
> > <restriction base="int">
> > <minInclusive value="10" />
> > </restriction>
> >
> > I would like to have similar information to required field:
> > @XmlAttribute(minInclusive=10).

In my opinion, the idea is fully legitimate. An external validator
could use this information to validate objects. There's a JSR on that,
see also Hibernate Validator.

Bye.
/lexi