users@jaxb.java.net

Re: ValidationEventHandler returns only parent object through ValidationEvent.getLocator().getObject()

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 01 Oct 2004 11:15:43 +0200

Hi.

>> The task might be the same, but JAXB is different, as it deals with
>> schematic models of object structures - including constraint
>> information. In principal, JAXB has enough information to construct
>> "object validator" you're mentioning below.
>
> JAXB can help contribute the constraint set it finds in the schema.
>
> My point is that:
>
> - there are many other sources that can feed constraints into
> the object validator (say, RDBMS)
> - you often want to add more constraints into the object validator
> - the object validator can be used by many frameworks (JSF, for example)

I'd like to find JAXB-specific solution first...

>> This seems to be a very good task, but quite complex, I'd say...
>> I've been working with XJC internals quite a lot last three month and
>> I'm not sure I have enough qualification/resources to implement such a
>> "constraint compiler".
>> Hm. I'll need to research this later...
>
> I think the object validator should be built outside JAXB. In
> particular, it should define its own API to interact with applications,
> and it should define how constraints can be defined.

Quite agree. An XJC add-on could then generate "instances" that check
generated objects.

Bye.
/lexi


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net