diff options
-rw-r--r-- | src/documentation/content/xdocs/design/parsing.xml | 12 | ||||
-rw-r--r-- | src/documentation/content/xdocs/dev/extensions.xml | 9 |
2 files changed, 9 insertions, 12 deletions
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?</p> <title>Validation</title> <p>If the input XML is not well-formed, that will be reported.</p> <p>There is no DTD for XSL-FO, so no formal validation is possible at the parser level.</p> - <p>The SAX handler will report an error for unrecognized namespaces.</p> + <p>The SAX handler will report an error for unrecognized <link href="#namespaces">namespaces</link>.</p> </section> <section id="namespaces"> <title>Namespaces</title> - <p>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.</p> - <p>To add an extension a developer can put in the classpath a jar that contains the file <code>/META-INF/services/org.apache.fop.fo.ElementMapping</code>. -This must contain a line with the fully qualified name of a class that implements the <em>org.apache.fop.fo.ElementMapping</em> interface. -This will then be loaded automatically at the start. -Internal mappings are: FO, SVG and Extension (pdf bookmarks).</p> + <p>To allow for extensions to the XSL-FO language, FOP provides a mechanism for handling foreign namespaces.</p> + <p>See <link href="../extensions.html">User Extensions</link> for a discussion of standard extensions shipped with FOP, and their related namespaces.</p> + <p>See <link href="../dev/extenstions.html">Developer Extensions</link> 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.</p> </section> <section> <title>Tree Building</title> 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. <ol> <li>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 <code>contrib</code> directory.</li> - <li>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.</li> + <li>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.</li> + <li>Create the following file: "/META-INF/services/org.apache.fop.fo.ElementMapping", which should contain the fully qualified classname of your ElementMapping implementation class.</li> + <li>Create a jar file containing all of the above files.</li> <li>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. |