[jdom-interest] Re: XML Schema Validation
Andy Clark
andyc at apache.org
Thu May 10 19:25:54 PDT 2001
Richard Baldwin wrote:
> I don't disagree with your statement. However, some
> elaboration may be beneficial for those who are
> interested in learning more about the behavior of JDOM
> in the event of a validation error.
You're right: I should have been more clear.
The Xerces parser does not throw an exception in the event
of a validation error. Therefore, parsing continues. However,
an ErrorHandler registered on the parser may choose to throw
an exception on either a warning, error, or fatal error. The
error handler could even choose *not* to throw an exception
on a fatal error -- but this is NOT advised.
In short, I think it's a bad idea for the default error
handler (BuilderErrorHandler) to throw an exception in the
case of a non-fatal error.
--
Andy Clark * IBM, TRL - Japan * andyc at apache.org
More information about the jdom-interest
mailing list