So it is an absolute (or recommended) behavior for the error handler to
throw an exception to stop the parse?
I was hoping that we could let the parse continue (not throwing an exception
in the error handler) in order to collect all the error messages and just
use a flag to say if any errors occur or not that we check after the parsing
to see if it was ok or not. May be I should direct such question to the
Xerces mailing list.

Thomas


-----Original Message-----
From: David N Bertoni/Cambridge/IBM [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 03, 2002 4:52 PM
To: xalan-c-users@xml.apache.org
Subject: RE: Xalan 1.3/1.4 behvior change when compiling a stylesheet






Hi Thomas,

This sounds like a change in the parser, or a bug fix that exposes incorrect
behavior on the part of your ErrorHandler derivative.  I suspect what's
happening is the parser is recovering from the error and continuing. The
appropriate behavior is for your ErrorHandler to throw some sort of
exception to stop the parse.

Dave



 

                      [EMAIL PROTECTED]

                      oftware.com                      To:
xalan-c-users@xml.apache.org

                                                       cc:      (bcc: David
N Bertoni/Cambridge/IBM)                                            
                      12/03/2002 11:15 AM              Subject: RE: Xalan
1.3/1.4 behvior change when compiling a stylesheet                    
 




Thanks for the information.
Actually, we are not throwing an exception from the error handler and this
is probably the issue. In 1.3 it seems that we did not have to
(compileStylesheet was still returning the appropriate success/failure
code), but that was may be already a mistake. We are going to change the
code to throw an exception. If the problem is still not fixed, I will open a
bug report.

Thomas


-----Original Message-----
From: David N Bertoni/Cambridge/IBM [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 03, 2002 1:48 PM
To: xalan-c-users@xml.apache.org
Subject: Re: Xalan 1.3/1.4 behvior change when compiling a stylesheet






Hi Thomas,

That sounds like a bug.  You are throwing an exception from your
ErrorHandler, right?

This could also be a change in how the parser is handling things.  Are you
talking about well-formedness errors in the stylesheet, or perhaps XPath
errors in stylesheet elements?

If you could open a bug report, with a minimal input document and stylesheet
that reproduce the problem, that would be great.

Dave





                      [EMAIL PROTECTED]

                      oftware.com                      To:
xalan-c-users@xml.apache.org

                                                       cc:      (bcc: David
N Bertoni/Cambridge/IBM)
                      12/03/2002 10:26 AM              Subject: Xalan
1.3/1.4 behvior change when compiling a stylesheet






A quick question in case someone experienced the same problem. If I
configure a XalanTransformer with an error handler and if I compile a
stylesheet, any errors in the stylesheet are reported through the error
handler. In Xalan 1.3, the return of the compileStylesheet operation was
also different from 0 (success) in case any errors were reported through the
error handler. In Xalan 1.4, it seems that even if some errors are reported
through the error handler, the return of the compileStylesheet is set to 0
(success). Is it an expected behavior change or should I investigate a
little more to make sure that I am not doing anything wrong?

Thanks.

Thomas


Reply via email to