users@jaxb.java.net

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

From: <MRist_at_lstelcom.com>
Date: Tue, 28 Sep 2004 13:45:46 +0200

Hi,

my problem is, that JAXB report correct validation error message but its
locator returns only the parent object of the incorrect leaf (node).

Why do you don't give the real JAXB object that cause the validation error?
With that information it whould be possible to walk through the whole tree,
find parents....
I use on-demand validation. I want to validate the JAXB tree not a xml
file.
Therefore the parser can't report line and column information where the
error occures - I have no chance to get information of the real error
location.
Using other validators (JARV) will report the correct xml location (line,
column) but I lose the connection to the corresponding JAXB object model.

I discussed this with Kohsuke a few months ago:
https://jaxb.dev.java.net/servlets/ReadMsg?list=users&msgNo=3303

> Or maybe we can just give you both the parent and the child node. Does
that help?

Yes that whould be a solution for me.
But do you want to implement this? Or can I attach this behaviour of JAXB
validator for myself.

Regards,
Michael



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