From e70ce1189bd3e512c49c309fd91bfa4bbab63150 Mon Sep 17 00:00:00 2001
From: William Victor Mote
Date: Thu, 24 Apr 2003 17:48:27 +0000
Subject: Normalize common contents between dev/extensions.xml and
design/parsing.xml.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196340 13f79535-47bb-0310-9956-ffa450edef68
---
src/documentation/content/xdocs/design/parsing.xml | 12 ++++--------
src/documentation/content/xdocs/dev/extensions.xml | 9 +++++----
2 files changed, 9 insertions(+), 12 deletions(-)
(limited to 'src/documentation/content')
diff --git a/src/documentation/content/xdocs/design/parsing.xml b/src/documentation/content/xdocs/design/parsing.xml
index 38802b463..396a1a263 100644
--- a/src/documentation/content/xdocs/design/parsing.xml
+++ b/src/documentation/content/xdocs/design/parsing.xml
@@ -29,17 +29,13 @@ Instead, FOP takes SAX events and builds its own tree-like structure. Why?
Validation
If the input XML is not well-formed, that will be reported.
There is no DTD for XSL-FO, so no formal validation is possible at the parser level.
-
The SAX handler will report an error for unrecognized namespaces.
+
The SAX handler will report an error for unrecognized namespaces.
Namespaces
-
The element mapping is a hashmap of all the elements in a particular namespace.
-This makes it easy to create a different object for each element.
-Element mappings are static to save on memory.
-
To add an extension a developer can put in the classpath a jar that contains the file /META-INF/services/org.apache.fop.fo.ElementMapping.
-This must contain a line with the fully qualified name of a class that implements the org.apache.fop.fo.ElementMapping interface.
-This will then be loaded automatically at the start.
-Internal mappings are: FO, SVG and Extension (pdf bookmarks).
+
To allow for extensions to the XSL-FO language, FOP provides a mechanism for handling foreign namespaces.
+
See User Extensions for a discussion of standard extensions shipped with FOP, and their related namespaces.
+
See Developer Extensions for a discussion of the mechanisms in place to allow developers to add their own extensions, including how to tell FOP about the foreign namespace.
Tree Building
diff --git a/src/documentation/content/xdocs/dev/extensions.xml b/src/documentation/content/xdocs/dev/extensions.xml
index 9c77e53a8..ef458ef7e 100644
--- a/src/documentation/content/xdocs/dev/extensions.xml
+++ b/src/documentation/content/xdocs/dev/extensions.xml
@@ -29,10 +29,11 @@ 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, and by looking at the examples in the contrib directory.
-
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.
+
Create a class that implements the org.apache.fop.fo.ElementMapping interface. ElementMapping is a hashmap of all of the elements in a particular namespace, which makes it easier for FOP to create a different object for each element.
+ElementMapping objects are static to save on memory.
+They are loaded by FOP when parsing starts to validate input.
+
Create the following file: "/META-INF/services/org.apache.fop.fo.ElementMapping", which should contain the fully qualified classname of your ElementMapping implementation class.
+
Create a jar file containing all of the above files.
Create your XSL-FO file with the extra XML data embedded in the file with the
correct name space.
The examples for SVG and pdfoutline.fo show how this can be done.
--
cgit v1.2.3