org.apache.fop.cli
Class InputHandler
java.lang.Object
org.apache.fop.cli.InputHandler
- ErrorListener, Renderable
public class InputHandler
extends java.lang.Object
Class for handling files input from command line
either with XML and XSLT files (and optionally xsl
parameters) or FO File input alone
protected Log | log - the logger
|
protected File | sourcefile - original source file
|
InputHandler(File fofile) - Constructor for FO input
|
InputHandler(File xmlfile, File xsltfile, Vector params) - Constructor for XML->XSLT->FO input
|
protected Source | createMainSource() - Creates a Source for the main input file.
|
protected Source | createXSLTSource() - Creates a Source for the selected stylesheet.
|
void | error(TransformerException exc) -
|
void | fatalError(TransformerException exc) -
|
void | renderTo(FOUserAgent userAgent, String outputFormat) -
|
void | renderTo(FOUserAgent userAgent, String outputFormat, OutputStream out) - Generate a document, given an initialized Fop object
|
void | transformTo(OutputStream out) - In contrast to render(Fop) this method only performs the XSLT stage and saves the
intermediate XSL-FO file to the output file.
|
protected void | transformTo(Result result) - Transforms the input document to the input format expected by FOP using XSLT.
|
void | warning(TransformerException exc) -
|
log
protected Log log
the logger
sourcefile
protected File sourcefile
original source file
InputHandler
public InputHandler(File fofile)
Constructor for FO input
fofile
- the file to read the FO document.
InputHandler
public InputHandler(File xmlfile,
File xsltfile,
Vector params)
Constructor for XML->XSLT->FO input
xmlfile
- XML filexsltfile
- XSLT fileparams
- Vector of command-line parameters (name, value,
name, value, ...) for XSL stylesheet, null if none
createMainSource
protected Source createMainSource()
Creates a Source for the main input file. Processes XInclude if
available in the XML parser.
- the Source for the main input file
createXSLTSource
protected Source createXSLTSource()
Creates a Source for the selected stylesheet.
- the Source for the selected stylesheet or null if there's no stylesheet
error
public void error(TransformerException exc)
fatalError
public void fatalError(TransformerException exc)
throws TransformerException
renderTo
public void renderTo(FOUserAgent userAgent,
String outputFormat,
OutputStream out)
throws FOPException
Generate a document, given an initialized Fop object
userAgent
- the user agentoutputFormat
- the output format to generate (MIME type, see MimeConstants)out
- the output stream to write the generated output to (may be null if not applicable)
transformTo
public void transformTo(OutputStream out)
throws FOPException
In contrast to render(Fop) this method only performs the XSLT stage and saves the
intermediate XSL-FO file to the output file.
out
- OutputStream to write the transformation result to.
transformTo
protected void transformTo(Result result)
throws FOPException
Transforms the input document to the input format expected by FOP using XSLT.
result
- the Result object where the result of the XSL transformation is sent to
warning
public void warning(TransformerException exc)
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.