I do not remember why I did that. Chris' argument is the most likely reason. In the mentioned revision there is also a method that returns FOTreeBuilder as a ContentHandler.
Simon On Fri, Sep 11, 2009 at 03:49:00PM +0100, Chris Bowditch wrote: > Vincent Hennebert wrote: > >Hi, > > > >does anyone know why the o.a.f.apps.Fop.getDefaultHandler method returns > >an instance of org.xml.sax.helpers.DefaultHandler and not just an > >org.xml.sax.ContentHandler? Could that be changed? > > Hi Vincent, > > Why would you want to change it? As Jeremias already said > DefaultHandler implemwents ContentHandler interface. I think the > reason for doing such changes is that it can more easily be tied to > a SAX stream stream using SAXParser.parse method. This method only > accepts DefaultHandler not ContentHandler. Of course you can get a > reference to the XMLReader and connect that to a ContentHandler but > its just more convenient to use SAXParser.parse. > > Regards, > > Chris -- Simon Pepping home page: http://www.leverkruid.eu
