[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-user
Subject:    Re: XML SAX well-formedness Error Reporting.
From:       khyati () zycus ! com
Date:       2005-11-24 7:03:23
Message-ID: OFF0414189.EF850EF1-ON652570C3.0023996E-652570C3.0025BA1E () zycus ! com
[Download RAW message or body]


Hi,

Yes you are right, as am new to XML, I realized that there is a confusion
between Validity Errors and well-formedness Errors.
For Validation Errors no Exception was thrown out by our ErrorHandler
Implementation, and hence the parsing continued.
Only for Fatal Errors i.e. well-formedness Errors it used to stop parsing.

Now we rethrow the Exception for Validity Errors, hence the parsing halts.

Thank you very much for the reply !

Thanks,
Khyati







                                                                           
             Elliotte Harold                                               
             <elharo@metalab.u                                             
             nc.edu>                                                    To 
                                       j-users@xerces.apache.org           
             11/23/2005 09:18                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: XML SAX well-formedness Error   
             Please respond to         Reporting.                          
             j-users@xerces.ap                                             
                 ache.org                                                  
                                                                           
                                                                           
                                                                           
                                                                           




khyati@zycus.com wrote:

> We also have SAXXMLValidator Class implementing ErrorHandler, which just
> prints error messages to Logs.
>
> The issue is, when the XML Document is malformed, errors are reported in
> the logs and the execution proceeds ahead. There is no Exception thrown
out
> for any well-formedness error.

That's very strange and shouldn't happen. Does parsing continue, or does
parsing stop with no exception? Are you sure you aren't confusing
well-formedness and validity errors? They aren't the same, and don't
have the same effect.

If nothing else, you could always just rethrow the exception from your
error handler. You have to do this for validity errors. I don't think
you should have to do it for well-formedness errors though, but maybe
that's changed. Do you have a reproducible test case?

-- Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


ForwardSourceID:NT000154BA


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic