commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [Digester] Validating a XML schema problem
Date Mon, 01 Mar 2004 22:04:49 GMT
On 1 Mar 2004, at 20:17, Simon Kitching wrote:

<snip>

>> From a quick glance at the code, it looks like Digester registers 
>> itself
> as an org.xml.sax.ErrorHandler (it extends
> org.xml.sax.helpers.DefaultHandler), and that by default it ignores all
> sax errors:
>
>     public void error(SAXParseException exception) throws SAXException 
> {
>
>         log.error("Parse Error at line " + exception.getLineNumber() +
>                 " column " + exception.getColumnNumber() + ": " +
>                 exception.getMessage(), exception);
>         if (errorHandler != null) {
>             errorHandler.error(exception);
>         }
>
>     }

yep

> Craig/Robert: why does Digester ignore sax errors by default?

(if i was being pendantic, i'd say that strictly speaking digester 
doesn't ignore them so much as only log them ;)

craig would be the one to give a definite answer on this one but here 
how i see it:

the default behaviour for SAX parsers is to ignore errors. digester 
simply extends this behaviour to provide better diagnostics. i do agree 
that it's a more than a little unintuitive. maybe we could provide a 
boolean flag to allow the user to select the behaviour they want.

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message