users@jaxb.java.net

RE: How can I specify length constraints?

From: KARR, DAVID (ATTSI) <"KARR,>
Date: Tue, 1 Mar 2011 15:22:48 -0800

> -----Original Message-----
> From: KARR, DAVID (ATTSI)
> Sent: Tuesday, March 01, 2011 3:17 PM
> To: users_at_jaxb.java.net
> Subject: How can I specify length constraints?
>
> When I write pure XML Schema, I can define a simple type based on
> string
> that has length restrictions, being a minimum and maximum length. I
> don't see a way to do that with JAXB annotations. Assuming I've just
> missed it, will schemagen respect that annotation in the generated
> schema?

Note that I'm not asking for something that will validate that the value
is within the length restrictions, I just want to be able to specify the
constraints in the JAXB annotations and have the generated schema
reflect those constraints.

I looked in the XJC plugins list and I didn't see anything like this.