From: Keiron Liddle Date: Mon, 2 Jul 2001 10:48:01 +0000 (+0000) Subject: allows adding mappings from user config X-Git-Tag: PRE_CODEFORMATTING~55 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dc9f289feb751f784c1d21fc2697d06af0d85ebe;p=xmlgraphics-fop.git allows adding mappings from user config git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194324 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/apps/Driver.java b/src/org/apache/fop/apps/Driver.java index f3c695369..1d954f146 100644 --- a/src/org/apache/fop/apps/Driver.java +++ b/src/org/apache/fop/apps/Driver.java @@ -36,7 +36,7 @@ import org.xml.sax.helpers.AttributesImpl; // Java import java.io.*; - +import java.util.*; /** * Primary class that drives overall FOP process. @@ -214,6 +214,18 @@ public class Driver { addElementMapping("org.apache.fop.extensions.ExtensionElementMapping"); addPropertyList ("org.apache.fop.extensions.ExtensionPropertyListMapping"); + + // add mappings from user configuration + Hashtable mappings = Configuration.getHashtableValue("mappings"); + if (mappings != null) { + String prop = (String) mappings.get("property"); + String ele = (String) mappings.get("element"); + try { + addElementMapping(ele); + addPropertyList(prop); + } catch (IllegalArgumentException e) { + } + } } /**