|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.cli.InputHandler
public class InputHandler
Class for handling files input from command line either with XML and XSLT files (and optionally xsl parameters) or FO File input alone.
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
the logger |
protected java.io.File |
sourcefile
original source file |
| Constructor Summary | |
|---|---|
InputHandler(java.io.File fofile)
Constructor for FO input |
|
InputHandler(java.io.File xmlfile,
java.io.File xsltfile,
java.util.Vector params)
Constructor for XML->XSLT->FO input |
|
| Method Summary | |
|---|---|
void |
createCatalogResolver(FOUserAgent userAgent)
Creates a catalog resolver and uses it for XML parsing and XSLT URI resolution. |
protected javax.xml.transform.Source |
createMainSource()
Creates a Source for the main input file. |
protected javax.xml.transform.Source |
createXSLTSource()
Creates a Source for the selected stylesheet. |
void |
error(javax.xml.transform.TransformerException exc)
|
void |
fatalError(javax.xml.transform.TransformerException exc)
|
void |
renderTo(FOUserAgent userAgent,
java.lang.String outputFormat)
Renders the pre-setup document. |
void |
renderTo(FOUserAgent userAgent,
java.lang.String outputFormat,
java.io.OutputStream out)
Generate a document, given an initialized Fop object |
void |
transformTo(java.io.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(javax.xml.transform.Result result)
Transforms the input document to the input format expected by FOP using XSLT. |
void |
warning(javax.xml.transform.TransformerException exc)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.File sourcefile
protected org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public InputHandler(java.io.File xmlfile,
java.io.File xsltfile,
java.util.Vector params)
xmlfile - XML filexsltfile - XSLT fileparams - Vector of command-line parameters (name, value,
name, value, ...) for XSL stylesheet, null if nonepublic InputHandler(java.io.File fofile)
fofile - the file to read the FO document.| Method Detail |
|---|
public void renderTo(FOUserAgent userAgent,
java.lang.String outputFormat,
java.io.OutputStream out)
throws FOPException
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)
FOPException - in case of an error during processing
public void renderTo(FOUserAgent userAgent,
java.lang.String outputFormat)
throws FOPException
renderTo in interface RenderableuserAgent - the user agentoutputFormat - the output format to generate (MIME type, see MimeConstants)
FOPException - if the FO processing fails
public void transformTo(java.io.OutputStream out)
throws FOPException
out - OutputStream to write the transformation result to.
FOPException - in case of an error during processingprotected javax.xml.transform.Source createMainSource()
public void createCatalogResolver(FOUserAgent userAgent)
userAgent - the user agent instanceprotected javax.xml.transform.Source createXSLTSource()
protected void transformTo(javax.xml.transform.Result result)
throws FOPException
result - the Result object where the result of the XSL transformation is sent to
FOPException - in case of an error during processingpublic void warning(javax.xml.transform.TransformerException exc)
warning in interface javax.xml.transform.ErrorListenerpublic void error(javax.xml.transform.TransformerException exc)
error in interface javax.xml.transform.ErrorListener
public void fatalError(javax.xml.transform.TransformerException exc)
throws javax.xml.transform.TransformerException
fatalError in interface javax.xml.transform.ErrorListenerjavax.xml.transform.TransformerException
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||