On Mar 5, 2006, at 20:52, Andreas L Delmelle wrote:

On Feb 24, 2006, at 03:51, Nils Meier wrote:

Hi Nils,

Just noticed this one has gone unanswered so far...

<snip />
Applied patch adds the dynamic lookup in the
factory and the necessary service definition file
residing in META-INF.

I kind of liked this idea, but would prefer to use FOP's own org.apache.fop.util.Service for that.

see commit: http://svn.apache.org/viewcvs?rev=383384&view=rev

BTW, any devs object to doing the same for *all* default ElementMappings?

Index: src/java/META-INF/services/org.apache.fop.fo.ElementMapping
===================================================================
--- src/java/META-INF/services/org.apache.fop.fo.ElementMapping (revision 0) +++ src/java/META-INF/services/org.apache.fop.fo.ElementMapping (revision 0)
@@ -0,0 +1,7 @@
+org.apache.fop.fo.FOElementMapping
+org.apache.fop.fo.extensions.svg.SVGElementMapping
+org.apache.fop.fo.extensions.svg.BatikExtensionElementMapping
+org.apache.fop.fo.extensions.ExtensionElementMapping
+org.apache.fop.fo.extensions.xmp.XMPElementMapping
+org.apache.fop.fo.extensions.xmp.RDFElementMapping
+org.apache.fop.render.ps.extensions.PSExtensionElementMapping
\ No newline at end of file
Index: src/java/org/apache/fop/fo/ElementMappingRegistry.java
===================================================================
--- src/java/org/apache/fop/fo/ElementMappingRegistry.java (revision 382930) +++ src/java/org/apache/fop/fo/ElementMappingRegistry.java (working copy)
@@ -74,14 +74,6 @@
* Sets all the element and property list mappings to their default values.
      */
     private void setupDefaultMappings() {
-        addElementMapping("org.apache.fop.fo.FOElementMapping");
- addElementMapping ("org.apache.fop.fo.extensions.svg.SVGElementMapping"); - addElementMapping ("org.apache.fop.fo.extensions.svg.BatikExtensionElementMapping"); - addElementMapping ("org.apache.fop.fo.extensions.ExtensionElementMapping"); - addElementMapping ("org.apache.fop.fo.extensions.xmp.XMPElementMapping"); - addElementMapping ("org.apache.fop.fo.extensions.xmp.RDFElementMapping"); - addElementMapping ("org.apache.fop.render.ps.extensions.PSExtensionElementMapping");
-
         // add mappings from available services
         Iterator providers = Service.providers(ElementMapping.class);
         if (providers != null) {

Cheers,

Andreas

Reply via email to