Embedding FOP

FOP can be embedded in other Java applications (such as XSLT engines) using either SAX or DOM.

Embedded using SAX

You give FOP a SAX Parser, SAX InputSource and Java PrintWriter.

Instantiate com.jtauber.fop.apps.SAXProcessor(org.xml.sax.Parser, org.xml.sax.InputSource) then run that object's method format(java.io.PrintWriter). format throws a com.jtauber.fop.apps.FOPException.

Embedded using DOM

You give FOP a DOM Document and Java PrintWriter.

Instantiate com.jtauber.fop.apps.DOMProcessor(org.w3c.dom.Document) then run that object's method format(java.io.PrintWriter). format throws a com.jtauber.fop.apps.FOPException.

James Tauber / jtauber@jtauber.com
Last updated: 1999-06-22