commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: digester 2.0 [WAS Re: [digester] [PROPOSAL] More pattern matching flexibility]
Date Tue, 03 Sep 2002 16:18:11 GMT
Hi Jean-Francois,

Jean-Francois Arcand wrote:
 > Not sure if I can join the discussion ;-)....anyway, here is some
 > ideas for Digester 2.0. We should also add some methods for:
 >
 > - add getter/setter for setting the ContentHandler (if someone doesn't
 > want to use the DigesterContext)
 > - add getter/setter for setting the ErrorHandler and the DTDHandler.
 > Having experienced hard problems with Xerces 2.0.1 - 2.0.2 and XML
 > Schema, being able to set my own ErrorHandler will be usefull.

I'm probably missing something, but here goes... why can't you just use:
   digester.getXMLReader().setContentHandler()
   digester.getXMLReader().setDTDHandler()
   digester.getXMLReader().setErrorHandler()
?

For instance, I've implemented a Rule that replaces the ContentHandler 
in Digester with one that creates a DOM DocumentFragment, pushes it on 
the stack, and returns control to Digester when an end tag matching the 
start tag is encountered.

> It might be a good idea to have a method on the Matcher interface like
> 
> public void setErrorHandler(ErrorHandler eh)
> 
> So different Matcher can customize their own ErrorHandler...

The Matcher interface should probably have set/getDigester() methods to
be able to access the XMLReader used by Digester.

> That will standardize the actual wrapper around the XMLReader....right 
> now, only the EntityResolver is available for clients.

I don't quite understand what you mean here...

[...]

-- 
Christopher Lenz
/=/ cmlenz at gmx.de


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message