http://xml.apache.org/http://www.apache.org/http://www.w3.org/

xml markup.

Google


About FOP
News
Status
Download
Release Notes
How to get Help

Running FOP
Embedding
Output Formats
Features
TODO
Limitations
Examples

SVG
Extensions
Fonts
Configuration

NEW DESIGN
Getting involved
Compiling
Testing

FAQ
Bugs
Resources
License


Extensions to FOP

Sometimes it is desirable to have extensions to xsl:fo in order to support some feature of the output format which isn't covered by the xsl:fo specification.

Default Extensions

These extension are available by default. They are automatically loaded and you only need to provide the correct namespace for your embedded

SVG

Please see the SVG page for more details.


Bookmarks

To use this standard Fop extension, you need to add a namespace entry for

You can provide outlines inside the root object (but outside any page-sequences or other formatting objects). Here's an example of an outline entry:

  <fox:outline internal-destination="sec3">
    <fox:label>Running FOP</fox:label>

    <fox:outline internal-destination="sec3-1">
      <fox:label>Prerequisites</fox:label>
    </fox:outline>
  <fox:outline>
</fo:root>

It works similarly to a basic-link. There is also an external-destination property, but it isn't supported currently. See the pdfoutline.fo file in docs/examples/fo for a more complete example.



Adding Your Own

To add your own extension you need to do the following things.

Write code that implements your extension functionality. The easiest place to start is by looking at the code in org.apache.fop.extension.

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.

Put your jar file in the classpath and then run fop over the fo file.




Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.