[jdom-interest] SAXOutputter

Elliotte Rusty Harold elharo at metalab.unc.edu
Sun Apr 25 06:28:03 PDT 2004


At 4:23 PM +0200 4/19/04, Laurent Bihanic wrote:

>Attached is a patch proposal that modifies SAXOutputter to :
>- make startDocument and endDocument protected final

Will that work? I don't think you can override a public method with a 
protected one, but maybe its different because ContentHandler is an 
interface being implemented rather than a class being subclassed?

>- add a new public method output(Content) to output a single Content node
>- add two new protected methods output(List/Content, boolean 
>fireDocumentEvents)
>
>The last two methods support not firing start/endDocument events when
>fireDocumentEvents is set to false. These methods are protected on purpose :
>To use them, one needs to subclass SAXOutputter which allows to add the logic
>to invoke startDocument and endDocument.

Sounds mighty complex to me. I don't think the added complexity is 
worth it for this edge case.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Effective XML (Addison-Wesley, 2003)
   http://www.cafeconleche.org/books/effectivexml
   http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA



More information about the jdom-interest mailing list