You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Elliotte Rusty Harold <el...@metalab.unc.edu> on 2003/05/16 17:34:28 UTC
How are validity exceptions being reported?
I've noticed that when I put Xerces in validating mode, it does not call
my registered SAX ErrorHandler. Instead it throws a fatal
ParseException. The same program runs fine when I use Crimson instead.
Is this a known problem?
Also, in a perhaps related issue, when I feed Xerces a namespace
malformed document (while not validating) it not only throws a
ParseException (which I want it to do) it prints a message on
System.err, which I don't want it to do. Is there any chance of getting
this fixed? I want control over error messages from my own program. I do
not want the a library printing *anything* on System.err unless I tell
it to. Again, is this a known issue?
I've tried hunting through Bugzilla for this, and got Zarro boogs but
Bugzilla query seems seriously broken. since it almost always returns
zero bugs. Neither problem appears in the complete SAX bugs list as far
as I can see.
--
Elliotte
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: How are validity exceptions being reported?
Posted by "K. Venugopal" <k....@sun.com>.
Hi Elliotte,
Elliotte Rusty Harold wrote:
> I've noticed that when I put Xerces in validating mode, it does not
> call my registered SAX ErrorHandler. Instead it throws a fatal
> ParseException. The same program runs fine when I use Crimson instead.
> Is this a known problem?
Which version of xerces are you using . I am able to get calls to my
registered error handler. Please send a sample program
that reproduces your problem to the xerces-j-user alias .
Regards
Venu
>
> Also, in a perhaps related issue, when I feed Xerces a namespace
> malformed document (while not validating) it not only throws a
> ParseException (which I want it to do) it prints a message on
> System.err, which I don't want it to do. Is there any chance of
> getting this fixed? I want control over error messages from my own
> program. I do not want the a library printing *anything* on System.err
> unless I tell it to. Again, is this a known issue?
>
> I've tried hunting through Bugzilla for this, and got Zarro boogs but
> Bugzilla query seems seriously broken. since it almost always returns
> zero bugs. Neither problem appears in the complete SAX bugs list as
> far as I can see.
>
>
> --
> Elliotte
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
Re: How are validity exceptions being reported?
Posted by Andy Clark <an...@apache.org>.
Elliotte Rusty Harold wrote:
> I've noticed that when I put Xerces in validating mode, it does not call
> my registered SAX ErrorHandler. Instead it throws a fatal
> ParseException. The same program runs fine when I use Crimson instead.
> Is this a known problem?
Without seeing the document in question, it's hard to say.
> Also, in a perhaps related issue, when I feed Xerces a namespace
> malformed document (while not validating) it not only throws a
> ParseException (which I want it to do) it prints a message on
> System.err, which I don't want it to do. Is there any chance of getting
> this fixed? I want control over error messages from my own program. I do
> not want the a library printing *anything* on System.err unless I tell
> it to. Again, is this a known issue?
I wouldn't call it an "issue". I made this change from the
beginning with Xerces2 because of the amount of errant bug
reports we received. People would constantly report that
Xerces wasn't validating because they didn't see any error
messages printed on the output.
You can override this behavior by setting a "null" error
reporter on the parser if you want errors to be silently
ignored. Setting your own non-null error reporter also
works. Or are you experiencing that it doesn't? In which
case, we may have something to look into.
--
Andy Clark * andyc@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org