When I run FOP I get the following messages when it gets to the
WritePageNumber extension function. Any suggestions?  I have the idea that
the extension function properties are not being mapped correctly -- am I
right in this?
thanks in advance.

[INFO] FOP 0.20.4
[INFO] building formatting object tree
[ERROR] property 'id' ignored
[ERROR] property 'file' ignored
[ERROR] property 'filename' ignored
[ERROR] property 'id' ignored
[ERROR] property 'file' ignored
[ERROR] property 'filename' ignored
[INFO] [1]
[ERROR] no Maker for filename
[ERROR] property filename ignored
[ERROR] no Maker for filename
[ERROR] property filename ignored
[ERROR] null


the ExtensionElementMapping file is as follows

package com.gleim.fop.extensions.writepagenumber;

import org.apache.fop.extensions.*;
import org.apache.fop.fo.*;
import org.apache.fop.fo.properties.ExtensionPropertyMapping;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;

public class ExtensionElementMapping implements ElementMapping {

    public static final String URI = "http://gleim.com/fop/extensions";;

    private static HashMap foObjs = null;

    private static synchronized void setupExt() {
        if(foObjs == null) {
            foObjs = new HashMap();
            foObjs.put("WritePageNumber", WritePageNumber.maker());
        }
    }


    public void addToBuilder(TreeBuilder builder) {
        setupExt();
        builder.addMapping(URI, foObjs);

        builder.addPropertyListBuilder(URI, new
DirectPropertyListBuilder());
    }

}



> -----Original Message-----
> From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 14, 2003 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: Re: FOP extension functions
>
>
> This passage means that when you package your extension in a separate
> JAR file you have to add a certain file to the JAR. It's name is
> org.apache.fop.fo.ElementMapping and must contain the fully qualified
> classname of your class that extends the ElementMapping interface. That
> file must be in the directory META-INF/services.
>
> So if you have generated your extension jar, it must have approximately
> the following contents:
> /META-INF/services/org.apache.fop.fo.ElementMapping
> com/gleim/myfopext/MyFopExtElementMapping.class
> com/gleim/myfopext/MyFopExtElement.class
> [..]
>
> In Driver.java (at the end) you will see code that inspects this special
> file you have to add. It's to make sure that the extension is registered.
>
> You can also skip this step with tat special file if you call
> Driver.addElementMapping() either with the fully qualified classname or
> an instance of the ElementMapping implementation.
>
> This may also help on your way:
> http://marc.theaimsgroup.com/?l=fop-user&m=103840000400488&w=2
>
> I hope this helps.
>
> May I ask what extension you're planning? Just curious.
>
> On 14.01.2003 16:40:53 Matthew L. Avizinis wrote:
> > Sorry, forgot to include what I wanted commentary on... :-)
> > Hello all,
> >   Could someone elaborate a little on the following from the
> FOP extensions
> > documentation please?  Mabye paste some example code as well?
> >
> > Create a jar file with your classes, it must also include the
> following file
> > "/META-INF/services/org.apache.fop.fo.ElementMapping". In this
> file you need
> > to put the fully qualified classname of your element mappings
> class. This
> > class must implement the "org.apache.fop.fo.ElementMapping" interface.
> >
> > Thanks in advance for help,
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to