On 01/19/2011 03:22 AM, Archie Cobbs wrote:
> On Mon, Jan 17, 2011 at 3:24 AM, Dennis Sosnoski <d...@sosnoski.com
> <mailto:d...@sosnoski.com>> wrote:
>
> I'd planned to support annotations for schema constraints at some
> point, and it shouldn't be a huge job to add them in. It would
> involve changes to the actual code generation, though, and could
> not be handled by simple extensions.
>
> I'm not sure that JSR-303 is my preferred implementation, either.
> As I understand it, it's based on using a Validator to check for
> constraint violations. That seems fundamentally flawed to me, I'd
> much rather see constraints enforced at the time values are set
> (immediate fail). If a value is supposed to be non-null, why
> should a set method support setting a null value? So although it
> would be nice to support generating JSR-303 annotations, I'd
> prefer to generate smart set methods that forbid violating a
> constraint.
>
>
> I think these are two different problems. The first thing you mention
> is some kind of Java annotations which would translate into additional
> XSD information during the JiBX Java -> XSD generation step. This
> makes sense as a nice feature to have in JiBX that would allow the
> developer to tighten up the generated XSD.
No, I was talking about generating the annotations from schema
simpleType restrictions. Sorry I wasn't clear on this.
- Dennis
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users