You can define a simpleType like this:
<xsd:simpleType name="ShortNameType">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="3"/>
</xsd:restriction>
</xsd:simpleType>
It'll still result in java.lang.String, just like xsd:String. Only
validation will check your XML's compliance with the min/maxLength facets.
-W
On Sat, Feb 14, 2009 at 9:26 AM, arun_rocky
<arunkumaravel.d_at_cognizant.com>wrote:
>
> hi,
>
> for me the validation required= true and nillable = false is working fine,
> i like to check the length of the element, do we have any attribute for
> that
> to check it.
>
> thanks in advance
> --
> View this message in context:
> http://www.nabble.com/max-length-field-validations-tp22010264p22010264.html
> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>