aboutsummaryrefslogtreecommitdiffstats
path: root/src/documentation/content/xdocs/dev/extensions.xml
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-10-28 08:41:01 +0000
committerKeiron Liddle <keiron@apache.org>2002-10-28 08:41:01 +0000
commit06a4ad36f67612273f489f1b6468805b9d5871c7 (patch)
tree8276cf2a0b1bdd63fdee0574d09fced83f48655b /src/documentation/content/xdocs/dev/extensions.xml
parentf4277e55a8810a0badd3a0dbb233178b678d0119 (diff)
downloadxmlgraphics-fop-06a4ad36f67612273f489f1b6468805b9d5871c7.tar.gz
xmlgraphics-fop-06a4ad36f67612273f489f1b6468805b9d5871c7.zip
updated docs for dev version
using new forrest docs git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195365 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/documentation/content/xdocs/dev/extensions.xml')
-rw-r--r--src/documentation/content/xdocs/dev/extensions.xml95
1 files changed, 95 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/dev/extensions.xml b/src/documentation/content/xdocs/dev/extensions.xml
new file mode 100644
index 000000000..bc6ceeb5a
--- /dev/null
+++ b/src/documentation/content/xdocs/dev/extensions.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
+ <document>
+ <header>
+ <title>Extensions to FOP</title>
+ </header>
+ <body>
+ <section>
+ <title>Overview</title>
+ <p>
+If the default funtionality of FOP needs to be extended for
+some reason then you can write an extensions.
+ </p>
+ <p>
+There are three types of extensions possible. An output document
+extensions such as the PDF bookmarks, an instream-foreign-object
+extensions such as SVG and an fo extension that creates an
+area in the area tree where normal xsl:fo is not possible.
+ </p>
+ </section>
+ <section>
+ <title>Default Extensions</title>
+ <p>
+These extension are available by default. They are automatically loaded
+and you only need to provide the correct namespace for your embedded
+xml markup.
+ </p>
+ <section>
+ <title>SVG</title>
+ <p>
+Please see the <link href="svg.html">SVG page</link> for more details.
+ </p>
+ <p>
+The SVG extensions gets all the xml elements in the SVG namespace
+and builds an SVG DOM with batik. The SVG DOM is then rendered
+to the output format using a handler for the XML content of
+the instream-foreign-object.
+ </p>
+ </section>
+ <section>
+ <title>PDF Bookmarks</title>
+ <p>
+To use this standard Fop extension, you need to add a namespace entry for
+ http://xml.apache.org/fop/extensions on the root element. </p>
+
+ <p>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:</p>
+ <source>
+<![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:fox="http://xml.apache.org/fop/extensions">
+ <fox:bookmarks>
+ <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>
+ </fox:bookmarks>
+</fo:root>]]></source>
+ <p>It works similarly to a basic-link. There is also an external-destination
+ property, but it isn't supported currently. See the <link href="pdfoutline.pdf">pdfoutline.pdf</link> for a more complete example.
+ </p>
+ </section>
+ </section>
+ <section>
+ <title>Adding Your Own</title>
+ <p>
+To add your own extension you need to do the following things.
+</p>
+<p>
+Write code that implements your extension functionality.
+There are some examples in the contrib/ directory.
+</p>
+<p>
+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.
+</p>
+<p>
+Create your fo file with the extra xml data embedded in the file
+with the correct name space. The examples for svg and
+<link href="pdfoutline.pdf">pdfoutline.pdf</link>
+show how this can be done.
+</p>
+<p>
+Put your jar file in the classpath and then run fop over the fo file.
+ </p>
+ </section>
+ </body>
+ </document>
+