keiron 01/07/02 03:48:04
Modified: src/org/apache/fop/apps Driver.java
Log:
allows adding mappings from user config
Revision Changes Path
1.27 +14 -2 xml-fop/src/org/apache/fop/apps/Driver.java
Index: Driver.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- Driver.java 2001/06/22 09:18:24 1.26
+++ Driver.java 2001/07/02 10:48:01 1.27
@@ -1,4 +1,4 @@
-/* $Id: Driver.java,v 1.26 2001/06/22 09:18:24 keiron Exp $
+/* $Id: Driver.java,v 1.27 2001/07/02 10:48:01 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
@@ -36,8 +36,8 @@
// Java
import java.io.*;
+import java.util.*;
-
/**
* Primary class that drives overall FOP process.
* <P>
@@ -214,6 +214,18 @@
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) {
+ }
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]