I have written an extension that I had discussed a while ago about writing
page numbers to an alternate xml file while FOP is running.  I submitted it
a while ago.  It has a number of properties that allow you to name the file,
whether it is the first or last entry going into the file so you can create
a well-formed xml file, name the root element if it is the first entry to
the file, the element name itself, and an id.

This has allowed me to compile large books with many images by chapter (thus
reducing memory usage) and still be able to make page cross-references from
chapter to chapter.

The code has been corrected recently by someone here that is more of a Java
programmer than I.  I will be posting the corrected extension code as soon
as I implement your very information instructions and test it.

Previously, I had only been able to insert the function by rebuilding FOP
with my code files in the source area (I had a misinterpretation of the
instructions that another person here at my company interpreted correctly
and pointed it out to me).

I also have an extension that emits two page numbers (there was a short
discussion a number of months ago) per page, e.g. left page - 1, 2; right
page -- 3, 4, since I recently had a need for such a thing myself.
thanks for the help.

> -----Original Message-----
> From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 14, 2003 11:20 AM
> 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