-Original Message-
From: Keiron Liddle [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 2:27 AM
To: FOP
Subject: Re: FOP extension elements
On Tue, 2002-07-23 at 22:20, Matthew L. Avizinis wrote:
Hello all,
The following is stated on the FOP website:
These extension are available by default. They are
automatically loaded and
you only need to provide the correct namespace for your embedded xml
markup.
OK, so fop:outline and fop:label are loaded by default
without needing
to do the other stuff described in Adding Your Own. What is
the mechanism
that allows this? In other words, if I have an extension
element(s) of my
own, what do I have to do in order for them work the same as outline and
label and not have to load my own jars.
The mechanism is that there is code that sets it all up.
What exactly do you want to do, there are different types of extensions.
I have an extension element that emits output to an alternate file than the
one FOP is mainly processing for, i.e. FOP is humming along spitting out to
a certain file, then when a certain element is encountered it emits a page
number to another file that the element specifies so I can use it later.
What do you mean load my own jars.
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).
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.
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 your time and help,
matthew l. avizinis
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]