On Wed, 2002-07-24 at 15:55, Matthew L. Avizinis wrote:
> What I mean is that when I run FOP and use my own extension element I do not
> want to have to have extra jar files hanging around.  I would like the class
> for my own element contained in the fop.jar just like outline and label.
> So what I want to know is how to package up my own element with the rest of
> fop when I build it and have it accessible like outline and label.
> If this would be more hassle than it's worth, than perhaps you could explain
> the following in a little more detail (with maybe example code or
> something).

If you really don't want an extra jar then I would suggest using ant to
add the resulting files from your project to the fop.jar. The ant "jar"
task can update an existing archive.

> 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.

There are examples in cvs but these work slightly different than what
you need.
As for that file then look at the examples in cvs. You will have a class
that implements the interface. Put the name of that class info a file.
Put the file in the location in the jar.

> Hopefully, when I am done I can donate some code or at the least spruce up
> the extension element instructions so that they are easier to follow when
> implementing a new element.  For instance, nowhere does it indicate that if
> the element has attributes that you have to include them in the
> codegen/extproperties.xml file in order for fop to even compile correctly.

Thanks for the offer but this is already done in cvs.


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

Reply via email to