Departamento de Industria, Transición Energética y Sostenibilidad

XSLTInputHandler

p12f.exe.pasarelapagos.utils.fop
Class XSLTInputHandler

java.lang.Object
  extended by org.apache.fop.apps.InputHandler
      extended by p12f.exe.pasarelapagos.utils.fop.XSLTInputHandler

public class XSLTInputHandler
extends org.apache.fop.apps.InputHandler

XSLTInputHandler basically takes an xmlfile and transforms it with an xsltFile and the resulting xsl:fo document is input for Fop.


Constructor Summary
XSLTInputHandler(java.io.Reader newXMLReader, java.io.File newXSLTFile)
           
 
Method Summary
 org.xml.sax.InputSource getInputSource()
          overwrites the method of the super class to return the xmlfile
 org.xml.sax.XMLReader getParser()
          overwrites this method of the super class and returns an XMLFilter instead of a simple XMLReader which allows chaining of transformations
static org.xml.sax.XMLFilter getXMLFilter(java.io.Reader xmlReader, 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(org.apache.fop.apps.Driver arg0)
           
 
Methods inherited from class org.apache.fop.apps.InputHandler
fileInputSource, urlInputSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSLTInputHandler

public XSLTInputHandler(java.io.Reader newXMLReader,
                        java.io.File newXSLTFile)
Method Detail

getInputSource

public org.xml.sax.InputSource getInputSource()
overwrites the method of the super class to return the xmlfile

Specified by:
getInputSource in class org.apache.fop.apps.InputHandler

getParser

public org.xml.sax.XMLReader getParser()
overwrites this method of the super class and returns an XMLFilter instead of a simple XMLReader which allows chaining of transformations

Specified by:
getParser in class org.apache.fop.apps.InputHandler

getXMLFilter

public static org.xml.sax.XMLFilter getXMLFilter(java.io.Reader xmlReader,
                                                 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. This way during the conversion of the xmlReader 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

run

public void run(org.apache.fop.apps.Driver arg0)
         throws org.apache.fop.apps.FOPException
Specified by:
run in class org.apache.fop.apps.InputHandler
Throws:
org.apache.fop.apps.FOPException