users@jaxb.java.net

Re: Restriction parameter from schema to class annotation.

From: Michał Letyński <mletynski_at_consol.pl>
Date: Wed, 17 Oct 2007 14:22:47 +0200

Hi.
> 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
>
Yes i need it for my external validator. Thanks for advice.