diff options
author | Kelly Campbell <kellyc@apache.org> | 2001-03-03 07:06:04 +0000 |
---|---|---|
committer | Kelly Campbell <kellyc@apache.org> | 2001-03-03 07:06:04 +0000 |
commit | 506dc799d08fece47bd72f1d0ede606a80013c52 (patch) | |
tree | 381a245304b2a10722f585f51c072ed24d7d0a3f /src/org/apache/fop/apps/CommandLineStarter.java | |
parent | 9902c22a0e180d5a3cc8f683be8ebcbcd8a23c23 (diff) | |
download | xmlgraphics-fop-506dc799d08fece47bd72f1d0ede606a80013c52.tar.gz xmlgraphics-fop-506dc799d08fece47bd72f1d0ede606a80013c52.zip |
Refactored Driver to simplify usage required for other apps
to integrate Fop.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194114 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/apps/CommandLineStarter.java')
-rw-r--r-- | src/org/apache/fop/apps/CommandLineStarter.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/org/apache/fop/apps/CommandLineStarter.java b/src/org/apache/fop/apps/CommandLineStarter.java index fe8cddec6..7d6aae9fc 100644 --- a/src/org/apache/fop/apps/CommandLineStarter.java +++ b/src/org/apache/fop/apps/CommandLineStarter.java @@ -38,20 +38,15 @@ public class CommandLineStarter extends Starter { XMLReader parser = inputHandler.getParser(); setParserFeatures(parser,errorDump); - Driver driver = new Driver(); + Driver driver = new Driver(); if (errorDump) { driver.setErrorDump(true); } try { - driver.setRenderer(commandLineOptions.getRenderer(), ""); - driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); - driver.addElementMapping("org.apache.fop.svg.SVGElementMapping"); - driver.addElementMapping("org.apache.fop.extensions.ExtensionElementMapping"); - driver.addPropertyList("org.apache.fop.fo.StandardPropertyListMapping"); - driver.addPropertyList("org.apache.fop.svg.SVGPropertyListMapping"); - driver.addPropertyList("org.apache.fop.extensions.ExtensionPropertyListMapping"); - driver.buildFOTree(parser,inputHandler.getInputSource()); + driver.setRenderer(commandLineOptions.getRenderer()); + + driver.buildFOTree(parser, inputHandler.getInputSource()); driver.format(); driver.setOutputStream(new FileOutputStream(commandLineOptions.getOutputFile())); driver.render(); |