]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
allows adding mappings from user config
authorKeiron Liddle <keiron@apache.org>
Mon, 2 Jul 2001 10:48:01 +0000 (10:48 +0000)
committerKeiron Liddle <keiron@apache.org>
Mon, 2 Jul 2001 10:48:01 +0000 (10:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194324 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/apps/Driver.java

index f3c695369d4ea597b7c546a266d12d79f788a3b5..1d954f146afe361a6efd190d81de276888c6d519 100644 (file)
@@ -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) {
+            }
+        }
     }
 
     /**