From: Glen Mazza Date: Fri, 4 Jul 2003 18:45:48 +0000 (+0000) Subject: FOTreeBuilder's ElementMapping initialization moved from Driver to FOTreeBuilder... X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1351 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c002a829bddac8d9860addda60e3941646f34c5b;p=xmlgraphics-fop.git FOTreeBuilder's ElementMapping initialization moved from Driver to FOTreeBuilder class. For embedded coding, AddElementMapping() functions retained in Driver class but reimplemented to just wrap the FOTreeBuilder versions. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196588 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index 514bfe436..ea1b3d425 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -81,13 +81,7 @@ import javax.xml.parsers.SAXParserFactory; // Java import java.io.BufferedReader; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.OutputStream; -import java.io.Reader; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.List; import java.util.Map; /** @@ -277,7 +271,6 @@ public class Driver implements LogEnabled { } treeBuilder = new FOTreeBuilder(); treeBuilder.setUserAgent(getUserAgent()); - setupDefaultMappings(); } /** @@ -391,31 +384,6 @@ public class Driver implements LogEnabled { this.reader = reader; } - /** - * Sets all the element and property list mappings to their default values. - * - */ - public void setupDefaultMappings() { - addElementMapping("org.apache.fop.fo.FOElementMapping"); - addElementMapping("org.apache.fop.svg.SVGElementMapping"); - addElementMapping("org.apache.fop.extensions.ExtensionElementMapping"); - - // add mappings from available services - Iterator providers = - Service.providers(org.apache.fop.fo.ElementMapping.class); - if (providers != null) { - while (providers.hasNext()) { - String str = (String)providers.next(); - try { - addElementMapping(str); - } catch (IllegalArgumentException e) { - getLogger().warn("Error while adding element mapping", e); - } - - } - } - } - /** * Shortcut to set the rendering type to use. Must be one of *