org.apache.fop.apps
Class TraxInputHandler

java.lang.Object
  extended byorg.apache.fop.apps.InputHandler
      extended byorg.apache.fop.apps.TraxInputHandler

public class TraxInputHandler
extends InputHandler

XSLTInputHandler basically takes an xml source and transforms it with an xslt source and the resulting xsl:fo document is input for Fop.


Constructor Summary
TraxInputHandler(java.io.File xmlfile, java.io.File xsltfile)
           
TraxInputHandler(org.xml.sax.InputSource xmlSource, org.xml.sax.InputSource xsltSource)
           
TraxInputHandler(java.lang.String xmlURL, java.lang.String xsltURL)
           
 
Method Summary
 org.xml.sax.InputSource getInputSource()
          Deprecated.  
 org.xml.sax.XMLReader getParser()
          Deprecated.  
static org.xml.sax.XMLFilter getXMLFilter(java.io.File xmlfile, java.io.File xsltfile)
          Creates from the transformer an instance of an XMLFilter which then can be used in a chain with the XMLReader passed to Driver.
 void run(Driver driver)
           
 void setParameter(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class org.apache.fop.apps.InputHandler
createParser, fileInputSource, urlInputSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TraxInputHandler

public TraxInputHandler(java.io.File xmlfile,
                        java.io.File xsltfile)
                 throws FOPException

TraxInputHandler

public TraxInputHandler(java.lang.String xmlURL,
                        java.lang.String xsltURL)
                 throws FOPException

TraxInputHandler

public TraxInputHandler(org.xml.sax.InputSource xmlSource,
                        org.xml.sax.InputSource xsltSource)
                 throws FOPException
Method Detail

getInputSource

public org.xml.sax.InputSource getInputSource()
Deprecated.  

Overwrites the method of the super class to return the xmlfile. Use run(Driver driver) instead.

Specified by:
getInputSource in class InputHandler

getParser

public org.xml.sax.XMLReader getParser()
                                throws FOPException
Deprecated.  

Overwrites this method of the super class and returns an XMLFilter instead of a simple XMLReader which allows chaining of transformations. Use run(Driver driver) instead.

Specified by:
getParser in class InputHandler
Throws:
FOPException

getXMLFilter

public static org.xml.sax.XMLFilter getXMLFilter(java.io.File xmlfile,
                                                 java.io.File xsltfile)
                                          throws FOPException
Creates from the transformer an instance of an XMLFilter which then can be used in a chain with the XMLReader passed to Driver. This way during the conversion of the xml file + xslt stylesheet the resulting data is fed into Fop. This should help to avoid memory problems

Parameters:
xmlfile - The xmlfile containing the text data
xsltfile - An xslt stylesheet
Returns:
XMLFilter an XMLFilter which can be chained together with other XMLReaders or XMLFilters
Throws:
FOPException

run

public void run(Driver driver)
         throws FOPException
Specified by:
run in class InputHandler
Throws:
FOPException

setParameter

public void setParameter(java.lang.String name,
                         java.lang.Object value)


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.