You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Matthew L. Avizinis" <ml...@gleim.com> on 2002/07/23 22:20:46 UTC

FOP extension elements

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.

I am assuming, of course, that the documentation listed is still accurate.
If it is not, can anyone provide the most recent information for include
extension elements?

thanks for helping,
   Matthew L. Avizinis <ma...@gleim.com>
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772
      www.gleim.com <http://www.gleim.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: FOP extension elements

Posted by Keiron Liddle <ke...@aftexsw.com>.
On Wed, 2002-07-24 at 17:23, Matthew L. Avizinis wrote:
> >
> > There are examples in cvs but these work slightly different than what
> > you need.
> Are you referring to outline and label or are there other extensions
> examples?  Are they in some folder other than "extensions"?  Path to them
> please?  I haven't been able to find any other examples of extension
> elements other than those two.
> thanks

Look in xml-fop/contrib.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: FOP extension elements

Posted by "Matthew L. Avizinis" <ml...@gleim.com>.
>
> There are examples in cvs but these work slightly different than what
> you need.
Are you referring to outline and label or are there other extensions
examples?  Are they in some folder other than "extensions"?  Path to them
please?  I haven't been able to find any other examples of extension
elements other than those two.
thanks

> 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: fop-dev-unsubscribe@xml.apache.org
> For additional commands, email: fop-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: FOP extension elements

Posted by Keiron Liddle <ke...@aftexsw.com>.
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: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


RE: FOP extension elements

Posted by "Matthew L. Avizinis" <ml...@gleim.com>.

> -----Original Message-----
> From: Keiron Liddle [mailto:keiron@aftexsw.com]
> 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: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FOP extension elements

Posted by Keiron Liddle <ke...@aftexsw.com>.
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.

What do you mean "load my own jars".

> I am assuming, of course, that the documentation listed is still accurate.
> If it is not, can anyone provide the most recent information for include
> extension elements?

If we are talking a maintanence release then that information is
accurate.
The code in cvs is generally easier to do extension but its not complete
yet.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org