that actually looks very nice to me -- using annotations. i was going to
look around more to see if you could really use annotations to do things
like that (i still haven't been able to play around with 1.5 yet).
incidentally -- yes, it would be easier to do them in the java classes,
but i don't generate the java classes, xjc does (is that what you mean
by "specify constraints outside the source file"?).
i suppose with jaxb 2.0, though, that won't be the case, so i'll be able
to bind my own classes to schema, and then, supposedly, do what's below.
jon
>
>
> Isn't it easier/useful if you can do those things in your Java class? as
> opposed to do them in the schema?
>
> Maybe
>
> class Abc {
> @NeverNull
> @Pattern(".*blubber.*")
> private String foo;
> }
>
> ?
>
> I guess you'd want another way to specify constraints outside the source
> file, but hopefully you see what I'm trying to say...
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net