xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r840735 [7/19] - in /websites/staging/xmlgraphics/trunk/content: ./ batik/ batik/dev/ batik/tools/ batik/using/ batik/using/scripting/ commons/ fop/ fop/0.95/ fop/1.0/ fop/1.1/ fop/trunk/
Date Tue, 04 Dec 2012 15:59:44 GMT
Modified: websites/staging/xmlgraphics/trunk/content/commons/postscript.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/commons/postscript.html (original)
+++ websites/staging/xmlgraphics/trunk/content/commons/postscript.html Tue Dec  4 15:59:34 2012
@@ -136,7 +136,7 @@ $(document).ready(function () {
         </div>
       	<!-- <div id="breadcrumb"><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/commons/">Commons</a></div> -->
       	<div class="section-content"><h1 id="tools-for-adobe-postscript">Tools for Adobe PostScript</h1>
-<h2 id="overview-wzxhzdk0wzxhzdk1">Overview <a id="overview"></a></h2>
+<h2 id="overview-wzxhzdk1wzxhzdk2">Overview <a id="overview"></a></h2>
 <p>Apache&trade; XML Graphics Commons contains various tools for writing and processing Adobe PostScript files. This includes:</p>
 <ul>
 <li>
@@ -150,24 +150,32 @@ $(document).ready(function () {
 We don't currently include a PostScript interpreter though we would love to have one. A Java-based PostScript interpreter to keep an eye on is the one from the <a href="http://foray.sourceforge.net">FOray project</a> .</p>
 </li>
 </ul>
-<h1 id="the-postscript-generator-wzxhzdk3wzxhzdk4">The PostScript generator <a id="generator"></a></h1>
+<h1 id="the-postscript-generator-wzxhzdk4wzxhzdk5">The PostScript generator <a id="generator"></a></h1>
 <p>The "PSGenerator" class can help writing PostScript files. It deals with things like escaping, saving/tracking/restoring graphics state, writing DSC comments and tracking of DSC resources.</p>
 <p>You will rarely interact with the PS generator itself, as it is probably more interesting to generate a PostScript file using Java2D which is described in the following section.</p>
-<h2 id="java2d-graphics2d-implementation-for-generating-postscript-and-eps-wzxhzdk5wzxhzdk6">Java2D: Graphics2D implementation for generating PostScript and EPS <a id="java2d"></a></h2>
+<h2 id="java2d-graphics2d-implementation-for-generating-postscript-and-eps-wzxhzdk6wzxhzdk7">Java2D: Graphics2D implementation for generating PostScript and EPS <a id="java2d"></a></h2>
 <p>We provide two classes (PSDocumentGraphics2D and EPSDocumentGraphics2D) which you can use to generated complete PostScript files using normal Java2D means. The difference between the two classes is that the EPS variant creates a fully compliant Encapsulated PostScript file while the PS variant simply creates a normal DSC-compliant level 2 PostScript file. It depends on your requirement which variant you choose. The PS variant is mostly for printing purposes while the EPS variant is better suited for inclusion in other documents.</p>
-<h3 id="creating-an-eps-file-wzxhzdk7wzxhzdk8">Creating an EPS file <a id="creating-eps"></a></h3>
+<h3 id="creating-an-eps-file-wzxhzdk8wzxhzdk9">Creating an EPS file <a id="creating-eps"></a></h3>
 <p>Creating an EPS file using the Graphics2D implementation is easy. Instantiate EPSDocumentGraphics2D, set a GraphicContext and set up the output document. Here's an example:</p>
-<p>import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;</p>
-<p class="."></p>
-<p>EPSDocumentGraphics2D g2d = new EPSDocumentGraphics2D(false);
-g2d.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());</p>
-<p>//Set up the document size
-g2d.setupDocument(out, 400, 200); //400pt x 200pt
-//out is the OutputStream to write the EPS to</p>
-<p>g2d.drawRect(10, 10, 50, 50); //paint a rectangle using normal Java2D calls</p>
-<p>g2d.finish(); //Wrap up and finalize the EPS file</p>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D</span><span class="o">;</span>
+
+<span class="o">[..]</span>
+
+<span class="n">EPSDocumentGraphics2D</span> <span class="n">g2d</span> <span class="o">=</span> <span class="k">new</span> <span class="n">EPSDocumentGraphics2D</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+<span class="n">g2d</span><span class="o">.</span><span class="na">setGraphicContext</span><span class="o">(</span><span class="k">new</span> <span class="n">org</span><span class="o">.</span><span class="na">apache</span><span class="o">.</span><span class="na">xmlgraphics</span><span class="o">.</span><span class="na">java2d</span><span class="o">.</span><span class="na">GraphicContext</span><span class="o">());</span>
+
+<span class="c1">//Set up the document size</span>
+<span class="n">g2d</span><span class="o">.</span><span class="na">setupDocument</span><span class="o">(</span><span class="n">out</span><span class="o">,</span> <span class="mi">400</span><span class="o">,</span> <span class="mi">200</span><span class="o">);</span> <span class="c1">//400pt x 200pt</span>
+<span class="c1">//out is the OutputStream to write the EPS to</span>
+
+<span class="n">g2d</span><span class="o">.</span><span class="na">drawRect</span><span class="o">(</span><span class="mi">10</span><span class="o">,</span> <span class="mi">10</span><span class="o">,</span> <span class="mi">50</span><span class="o">,</span> <span class="mi">50</span><span class="o">);</span> <span class="c1">//paint a rectangle using normal Java2D calls</span>
+
+<span class="n">g2d</span><span class="o">.</span><span class="na">finish</span><span class="o">();</span> <span class="c1">//Wrap up and finalize the EPS file</span>
+</pre></div>
+
+
 <p>A complete example for generating an EPS files can be found in the <a href="http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/examples/java/java2d/ps/">"examples" directory</a> in the distribution.</p>
-<h2 id="dsc-parserprocessor-wzxhzdk9wzxhzdk10">DSC parser/processor <a id="dsc"></a></h2>
+<h2 id="dsc-parserprocessor-wzxhzdk10wzxhzdk11">DSC parser/processor <a id="dsc"></a></h2>
 <p>Many PostScript files use special comments to structure a document. This allows manipulation of PostScript files without interpreting them. These special comments are defined in the <a href="http://partners.adobe.com/public/developer/en/ps/5001.DSC_Spec.pdf">Document Structuring Conventions</a> . The code in Commons is designed to work with DSC 3.0. For details on how DSC is used, please take a look at the DSC specification.</p>
 <p>The DSC support in Commons was primarily developed to implement resource optimization features in <a href="http://xmlgraphics.apache.org/fop/">Apache FOP</a> 's PostScript output support. Resources like images which are used repeatedly in a document should not be written to the PostScript file each time it is used. Instead it is written once at the beginning of the file as a PostScript form. The form is then called whenever the image needs painting.</p>
 <p>But the DSC parser could potentially be used for other purposes. The most obvious is extracting a subset of pages from a DSC-compliant file. Assume you want to print only page 45 to 57 of a particular document. There's an example that demonstrates exactly this. Check out the "examples" directory in the distribution. Other potential use cases for the DSC parser are:</p>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/anttask.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/anttask.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/anttask.html Tue Dec  4 15:59:34 2012
@@ -346,16 +346,16 @@ $(document).ready(function () {
 <h2 id="description-wzxhzdk5wzxhzdk6">Description <a id="basics"></a></h2>
 <p>The FOP Ant task will convert XSL-FO documents to PDF, PS, PCL etc. output (see <a href="output.html">Output formats</a> for available formats).</p>
 <p>To call FOP tasks within Ant, first add a FOP task definition to your Ant build file. One method of defining the task is as follows:</p>
-<div class="codehilite"><pre><span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;fop.home&quot;</span> <span class="na">value=</span><span class="s">&quot;....path to your FOP HOME directory...&quot;/</span><span class="nt">&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;property</span> <span class="na">name=</span><span class="s">&quot;fop.home&quot;</span> <span class="na">value=</span><span class="s">&quot;....path to your FOP HOME directory...&quot;</span><span class="nt">/&gt;</span>
 
-<span class="nt">&lt;taskdef</span> <span class="na">name=</span><span class="s">&quot;fop&quot;</span> 
+<span class="nt">&lt;taskdef</span> <span class="na">name=</span><span class="s">&quot;fop&quot;</span>
          <span class="na">classname=</span><span class="s">&quot;org.apache.fop.tools.anttasks.Fop&quot;</span><span class="nt">&gt;</span>
   <span class="nt">&lt;classpath&gt;</span>
-    <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">fop</span><span class="o">.</span><span class="n">home</span><span class="cp">}</span><span class="s">/lib&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.jar&quot;/</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;${fop.home}/lib&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.jar&quot;</span><span class="nt">/&gt;</span>
     <span class="nt">&lt;/fileset&gt;</span>
-    <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">fop</span><span class="o">.</span><span class="n">home</span><span class="cp">}</span><span class="s">/build&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;fop.jar&quot;/</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;${fop.home}/build&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;fop.jar&quot;</span><span class="nt">/&gt;</span>
       <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;fop-hyph.jar&quot;</span> <span class="nt">/&gt;</span>
     <span class="nt">&lt;/fileset&gt;</span>
   <span class="nt">&lt;/classpath&gt;</span>
@@ -451,7 +451,7 @@ $(document).ready(function () {
 <h2 id="examples-wzxhzdk12wzxhzdk13">Examples <a id="examples"></a></h2>
 <p>The following example converts a single XSL-FO file to a PDF document:</p>
 <div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-pdf&quot;</span> <span class="na">description=</span><span class="s">&quot;Generates a single PDF file&quot;</span><span class="nt">&gt;</span>
-   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/pdf&quot;</span> 
+   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/pdf&quot;</span>
         <span class="na">fofile=</span><span class="s">&quot;c:\working\foDirectory\foDocument.fo&quot;</span>
         <span class="na">outfile=</span><span class="s">&quot;c:\working\pdfDirectory\pdfDocument.pdf&quot;</span> <span class="nt">/&gt;</span>
 <span class="nt">&lt;/target&gt;</span>
@@ -459,12 +459,12 @@ $(document).ready(function () {
 
 
 <p>This example converts all XSL-FO files within an entire directory to PostScript:</p>
-<div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-multiple-ps&quot;</span> 
+<div class="codehilite"><pre><span class="nt">&lt;target</span> <span class="na">name=</span><span class="s">&quot;generate-multiple-ps&quot;</span>
         <span class="na">description=</span><span class="s">&quot;Generates multiple PostScript files&quot;</span><span class="nt">&gt;</span>
-   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/postscript&quot;</span> 
-        <span class="na">outdir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">build</span><span class="o">.</span><span class="n">dir</span><span class="cp">}</span><span class="s">&quot;</span> <span class="na">messagelevel=</span><span class="s">&quot;debug&quot;</span><span class="nt">&gt;</span>
-        <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;</span><span class="cp">${</span><span class="n">fo</span><span class="o">.</span><span class="n">examples</span><span class="o">.</span><span class="n">dir</span><span class="cp">}</span><span class="s">&quot;</span><span class="nt">&gt;</span>
-           <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.fo&quot;/</span><span class="nt">&gt;</span>
+   <span class="nt">&lt;fop</span> <span class="na">format=</span><span class="s">&quot;application/postscript&quot;</span>
+        <span class="na">outdir=</span><span class="s">&quot;${build.dir}&quot;</span> <span class="na">messagelevel=</span><span class="s">&quot;debug&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fileset</span> <span class="na">dir=</span><span class="s">&quot;${fo.examples.dir}&quot;</span><span class="nt">&gt;</span>
+           <span class="nt">&lt;include</span> <span class="na">name=</span><span class="s">&quot;*.fo&quot;</span><span class="nt">/&gt;</span>
         <span class="nt">&lt;/fileset&gt;</span>
    <span class="nt">&lt;/fop&gt;</span>
 <span class="nt">&lt;/target&gt;</span>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/configuration.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/configuration.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/configuration.html Tue Dec  4 15:59:34 2012
@@ -473,84 +473,84 @@ $(document).ready(function () {
 <h2 id="renderer-configuration-wzxhzdk14wzxhzdk15">Renderer configuration <a id="renderers"></a></h2>
 <p>Each Renderer has its own configuration section which is identified by the MIME type the Renderer is written for, ex. "application/pdf" for the PDF Renderer.</p>
 <p>The configuration for the PDF Renderer could look like this:</p>
-<div class="codehilite"><pre>  <span class="nt">&lt;renderers&gt;</span>
-    <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;filterList&gt;</span>
-        <span class="c">&lt;!-- provides compression using zlib flate (default is on) --&gt;</span>
-        <span class="nt">&lt;value&gt;</span>flate<span class="nt">&lt;/value&gt;</span>
-      <span class="nt">&lt;/filterList&gt;</span>
-      <span class="nt">&lt;fonts&gt;</span>
-        <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arial.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arial.ttf&quot;</span><span class="nt">&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-        <span class="nt">&lt;/font&gt;</span>
-        <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arialb.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arialb.ttf&quot;</span><span class="nt">&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
-        <span class="nt">&lt;/font&gt;</span>
-      <span class="nt">&lt;/fonts&gt;</span>
-    <span class="nt">&lt;/renderer&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;renderers&gt;</span>
+  <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;filterList&gt;</span>
+      <span class="c">&lt;!-- provides compression using zlib flate (default is on) --&gt;</span>
+      <span class="nt">&lt;value&gt;</span>flate<span class="nt">&lt;/value&gt;</span>
+    <span class="nt">&lt;/filterList&gt;</span>
+    <span class="nt">&lt;fonts&gt;</span>
+      <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arial.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arial.ttf&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+        <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+      <span class="nt">&lt;/font&gt;</span>
+      <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arialb.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arialb.ttf&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+        <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+      <span class="nt">&lt;/font&gt;</span>
+    <span class="nt">&lt;/fonts&gt;</span>
+  <span class="nt">&lt;/renderer&gt;</span>
 
-    <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/postscript&quot;</span><span class="nt">&gt;</span>
-    <span class="c">&lt;!-- etc. etc..... --&gt;</span>
+  <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/postscript&quot;</span><span class="nt">&gt;</span>
+  <span class="c">&lt;!-- etc. etc..... --&gt;</span>
 </pre></div>
 
 
 <p>The details on the font configuration can be found on the separate <a href="fonts.html">Fonts</a> page. Note especially the section entitled <a href="fonts.html#register">Register Fonts with FOP</a> .</p>
 <h3 id="special-settings-for-the-pdf-renderer-wzxhzdk16wzxhzdk17">Special Settings for the PDF Renderer <a id="pdf-renderer"></a></h3>
 <p>The configuration element for the PDF renderer contains two elements. One is for the font configuration (please follow the link above) and one is for the "filter list". The filter list controls how the individual objects in a PDF file are encoded. By default, all objects get "flate" encoded (i.e. simply compressed with the same algorithm that is also used in ZIP files). Most users don't need to change that setting. For debugging purposes, it may be desired not to compress the internal objects at all so the generated PDF commands can be read. In that case, you can simply use the following filter list. The second filter list (type="image") ensures that all images still get compressed but also ASCII-85 encoded so the produced PDF file is still easily readable in a text editor.</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;filterList&gt;</span>
-        <span class="nt">&lt;value&gt;</span>null<span class="nt">&lt;/value&gt;</span>
-      <span class="nt">&lt;/filterList&gt;</span>
-      <span class="nt">&lt;filterList</span> <span class="na">type=</span><span class="s">&quot;image&quot;</span><span class="nt">&gt;</span>
-        <span class="nt">&lt;value&gt;</span>flate<span class="nt">&lt;/value&gt;</span>
-        <span class="nt">&lt;value&gt;</span>ascii-85<span class="nt">&lt;/value&gt;</span>
-      <span class="nt">&lt;/filterList&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;filterList&gt;</span>
+    <span class="nt">&lt;value&gt;</span>null<span class="nt">&lt;/value&gt;</span>
+  <span class="nt">&lt;/filterList&gt;</span>
+  <span class="nt">&lt;filterList</span> <span class="na">type=</span><span class="s">&quot;image&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;value&gt;</span>flate<span class="nt">&lt;/value&gt;</span>
+    <span class="nt">&lt;value&gt;</span>ascii-85<span class="nt">&lt;/value&gt;</span>
+  <span class="nt">&lt;/filterList&gt;</span>
 
-      <span class="nt">&lt;fonts....</span>
-    <span class="err">&lt;/renderer</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;fonts....</span>
+<span class="err">&lt;/renderer</span><span class="nt">&gt;</span>
 </pre></div>
 
 
 <p>Another (optional) setting specific to the PDF Renderer is an output color profile, an ICC color profile which indicates the target color space the PDF file is generated for. This setting is mainly used in conjunction with the <a href="pdfx.html">PDF/X</a> feature. An example:</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;filterList...</span>
+<div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;filterList...</span>
 
-      <span class="err">&lt;output-profile</span><span class="nt">&gt;</span>C:\FOP\Color\EuropeISOCoatedFOGRA27.icc<span class="nt">&lt;/output-profile&gt;</span>
+  <span class="err">&lt;output-profile</span><span class="nt">&gt;</span>C:\FOP\Color\EuropeISOCoatedFOGRA27.icc<span class="nt">&lt;/output-profile&gt;</span>
 
-      <span class="nt">&lt;fonts....</span>
-      <span class="err">&lt;/renderer</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;fonts....</span>
+  <span class="err">&lt;/renderer</span><span class="nt">&gt;</span>
 </pre></div>
 
 
 <p>Some people don't have high requirements on color fidelity but instead want the smallest PDF file sizes possible. In this case it's possible to disable the default sRGB color space which XSL-FO requires. This will cause RGB colors to be generated as device-specific RGB. Please note that this option is unavailable (and will cause an error) if you enable PDF/A or PDF/X functionality or if you specify an output profile. This setting will make the PDF about 4KB smaller. To disable the sRGB color space add the following setting:</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;filterList...</span>
+<div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/pdf&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;filterList...</span>
 
-      <span class="err">&lt;disable-srgb-colorspace</span><span class="nt">&gt;</span>true<span class="nt">&lt;/disable-srgb-colorspace&gt;</span>
+  <span class="err">&lt;disable-srgb-colorspace</span><span class="nt">&gt;</span>true<span class="nt">&lt;/disable-srgb-colorspace&gt;</span>
 
-      <span class="nt">&lt;fonts....</span>
-      <span class="err">&lt;/renderer</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;fonts....</span>
+  <span class="err">&lt;/renderer</span><span class="nt">&gt;</span>
 </pre></div>
 
 
 <h3 id="special-settings-for-the-postscript-renderer-wzxhzdk18wzxhzdk19">Special Settings for the PostScript Renderer <a id="ps-renderer"></a></h3>
 <p>Besides the normal font configuration (the same "fonts" element as for the PDF renderer) the PostScript renderer has an additional setting to force landscape pages to be rotated to fit on a page inserted into the printer in portrait mode. Set the value to "true" to activate this feature. The default is "false". Example:</p>
-<div class="codehilite"><pre>    <span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/postscript&quot;</span><span class="nt">&gt;</span>
-      <span class="nt">&lt;auto-rotate-landscape&gt;</span>true<span class="nt">&lt;/auto-rotate-landscape&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;renderer</span> <span class="na">mime=</span><span class="s">&quot;application/postscript&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;auto-rotate-landscape&gt;</span>true<span class="nt">&lt;/auto-rotate-landscape&gt;</span>
 
-      <span class="nt">&lt;fonts&gt;</span>
-        <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arial.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arial.ttf&quot;</span><span class="nt">&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
-        <span class="nt">&lt;/font&gt;</span>
-        <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arialb.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arialb.ttf&quot;</span><span class="nt">&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
-          <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
-        <span class="nt">&lt;/font&gt;</span>
-      <span class="nt">&lt;/fonts&gt;</span>
-    <span class="nt">&lt;/renderer&gt;</span>
+  <span class="nt">&lt;fonts&gt;</span>
+    <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arial.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arial.ttf&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;normal&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;/font&gt;</span>
+    <span class="nt">&lt;font</span> <span class="na">metrics-url=</span><span class="s">&quot;arialb.xml&quot;</span> <span class="na">kerning=</span><span class="s">&quot;yes&quot;</span> <span class="na">embed-url=</span><span class="s">&quot;arialb.ttf&quot;</span><span class="nt">&gt;</span>
+      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;Arial&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+      <span class="nt">&lt;font-triplet</span> <span class="na">name=</span><span class="s">&quot;ArialMT&quot;</span> <span class="na">style=</span><span class="s">&quot;normal&quot;</span> <span class="na">weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">/&gt;</span>
+    <span class="nt">&lt;/font&gt;</span>
+  <span class="nt">&lt;/fonts&gt;</span>
+<span class="nt">&lt;/renderer&gt;</span>
 </pre></div>
 
 
@@ -575,10 +575,11 @@ $(document).ready(function () {
 </li>
 <li>
 <p>The FOP distribution contains a schema for configuration files, at src/foschema/fop-configuration.xsd. Did you validate your configuration file against it? Add the following schema location to the <code>schema</code> element:</p>
-<p><fop
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:noNamespaceSchemaLocation=
-    "http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co"></p>
+<p>:::xml
+<fop
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:noNamespaceSchemaLocation=
+  "http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd?view=co"></p>
 </li>
 </ul>
 <p>and run the configuration file through a validating schema parser. Note that the schema cannot detect all errors, and that it is stricter about the order of some elements than FOP itself is.</p>

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/embedding.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/embedding.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/embedding.html Tue Dec  4 15:59:34 2012
@@ -341,51 +341,51 @@ $(document).ready(function () {
         <div id="items">
         </div>
       	<!-- <div id="breadcrumb"><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/0.95/">0.95</a></div> -->
-      	<div class="section-content"><h1 id="apachewzxhzdk21-fop-embedding">Apache&trade; FOP: Embedding</h1>
+      	<div class="section-content"><h1 id="apachewzxhzdk22-fop-embedding">Apache&trade; FOP: Embedding</h1>
 <p><subtitle>How to Embed Apache&trade; FOP in a Java application</subtitle></p>
-<h2 id="overview-wzxhzdk25wzxhzdk26">Overview <a id="overview"></a></h2>
+<h2 id="overview-wzxhzdk26wzxhzdk27">Overview <a id="overview"></a></h2>
 <p>Review <a href="running.html">Running Apache&trade; FOP</a> for important information that applies to embedded applications as well as command-line use, such as options and performance.</p>
 <p>To embed Apache&trade; FOP in your application, first create a new org.apache.fop.apps.FopFactory instance. This object can be used to launch multiple rendering runs. For each run, create a new org.apache.fop.apps.Fop instance through one of the factory methods of FopFactory. In the method call you specify which output format (i.e. Renderer) to use and, if the selected renderer requires an OutputStream, which OutputStream to use for the results of the rendering. You can customize FOP's behaviour in a rendering run by supplying your own FOUserAgent instance. The FOUserAgent can, for example, be used to set your own Renderer instance (details below). Finally, you retrieve a SAX DefaultHandler instance from the Fop object and use that as the SAXResult of your transformation.
 We recently changed FOP's outer API to what we consider the final API. This might require some changes in your application. The main reasons for these changes were performance improvements due to better reuse of reusable objects and reduced use of static variables for added flexibility in complex environments.</p>
-<h2 id="basic-usage-pattern-wzxhzdk29wzxhzdk30">Basic Usage Pattern <a id="basics"></a></h2>
+<h2 id="basic-usage-pattern-wzxhzdk30wzxhzdk31">Basic Usage Pattern <a id="basics"></a></h2>
 <p>Apache FOP relies heavily on JAXP. It uses SAX events exclusively to receive the XSL-FO input document. It is therefore a good idea that you know a few things about JAXP (which is a good skill anyway). Let's look at the basic usage pattern for FOP...</p>
 <p>Here is the basic pattern to render an XSL-FO file to PDF:</p>
-<div class="codehilite"><pre><span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">fop</span><span class="o">.</span><span class="n">apps</span><span class="o">.</span><span class="n">FopFactory</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">fop</span><span class="o">.</span><span class="n">apps</span><span class="o">.</span><span class="n">Fop</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">fop</span><span class="o">.</span><span class="n">apps</span><span class="o">.</span><span class="n">MimeConstants</span><span class="p">;</span>
-
-<span class="sr">/*..*/</span>
-
-<span class="sr">//</span> <span class="n">Step</span> <span class="mi">1</span><span class="p">:</span> <span class="n">Construct</span> <span class="n">a</span> <span class="n">FopFactory</span>
-<span class="sr">//</span> <span class="p">(</span><span class="n">reuse</span> <span class="k">if</span> <span class="n">you</span> <span class="n">plan</span> <span class="n">to</span> <span class="n">render</span> <span class="n">multiple</span> <span class="n">documents</span><span class="o">!</span><span class="p">)</span>
-<span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
-
-<span class="sr">//</span> <span class="n">Step</span> <span class="mi">2</span><span class="p">:</span> <span class="n">Set</span> <span class="n">up</span> <span class="n">output</span> <span class="n">stream</span><span class="o">.</span>
-<span class="sr">//</span> <span class="n">Note:</span> <span class="n">Using</span> <span class="n">BufferedOutputStream</span> <span class="k">for</span> <span class="n">performance</span> <span class="n">reasons</span> <span class="p">(</span><span class="n">helpful</span> <span class="n">with</span> <span class="n">FileOutputStreams</span><span class="p">)</span><span class="o">.</span>
-<span class="n">OutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BufferedOutputStream</span><span class="p">(</span><span class="k">new</span> <span class="n">FileOutputStream</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="s">&quot;C:/Temp/myfile.pdf&quot;</span><span class="p">)));</span>
-
-<span class="n">try</span> <span class="p">{</span>
-  <span class="sr">//</span> <span class="n">Step</span> <span class="mi">3</span><span class="p">:</span> <span class="n">Construct</span> <span class="n">fop</span> <span class="n">with</span> <span class="n">desired</span> <span class="n">output</span> <span class="nb">format</span>
-  <span class="n">Fop</span> <span class="n">fop</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="n">newFop</span><span class="p">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="n">MIME_PDF</span><span class="p">,</span> <span class="n">out</span><span class="p">);</span>
-
-  <span class="sr">//</span> <span class="n">Step</span> <span class="mi">4</span><span class="p">:</span> <span class="n">Setup</span> <span class="n">JAXP</span> <span class="n">using</span> <span class="n">identity</span> <span class="n">transformer</span>
-  <span class="n">TransformerFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">TransformerFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
-  <span class="n">Transformer</span> <span class="n">transformer</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="n">newTransformer</span><span class="p">();</span> <span class="sr">//</span> <span class="n">identity</span> <span class="n">transformer</span>
-
-  <span class="sr">//</span> <span class="n">Step</span> <span class="mi">5</span><span class="p">:</span> <span class="n">Setup</span> <span class="n">input</span> <span class="ow">and</span> <span class="n">output</span> <span class="k">for</span> <span class="n">XSLT</span> <span class="n">transformation</span>
-  <span class="sr">//</span> <span class="n">Setup</span> <span class="n">input</span> <span class="n">stream</span>
-  <span class="n">Source</span> <span class="n">src</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="s">&quot;C:/Temp/myfile.fo&quot;</span><span class="p">));</span>
-
-  <span class="sr">//</span> <span class="n">Resulting</span> <span class="n">SAX</span> <span class="n">events</span> <span class="p">(</span><span class="n">the</span> <span class="n">generated</span> <span class="n">FO</span><span class="p">)</span> <span class="n">must</span> <span class="n">be</span> <span class="n">piped</span> <span class="n">through</span> <span class="n">to</span> <span class="n">FOP</span>
-  <span class="n">Result</span> <span class="n">res</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SAXResult</span><span class="p">(</span><span class="n">fop</span><span class="o">.</span><span class="n">getDefaultHandler</span><span class="p">());</span>
-
-  <span class="sr">//</span> <span class="n">Step</span> <span class="mi">6</span><span class="p">:</span> <span class="n">Start</span> <span class="n">XSLT</span> <span class="n">transformation</span> <span class="ow">and</span> <span class="n">FOP</span> <span class="n">processing</span>
-  <span class="n">transformer</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="n">res</span><span class="p">);</span>
-
-<span class="p">}</span> <span class="n">finally</span> <span class="p">{</span>
-  <span class="sr">//</span><span class="n">Clean</span><span class="o">-</span><span class="n">up</span>
-  <span class="n">out</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
-<span class="p">}</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">org.apache.fop.apps.FopFactory</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.fop.apps.Fop</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.fop.apps.MimeConstants</span><span class="o">;</span>
+
+<span class="cm">/*..*/</span>
+
+<span class="c1">// Step 1: Construct a FopFactory</span>
+<span class="c1">// (reuse if you plan to render multiple documents!)</span>
+<span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+
+<span class="c1">// Step 2: Set up output stream.</span>
+<span class="c1">// Note: Using BufferedOutputStream for performance reasons (helpful with FileOutputStreams).</span>
+<span class="n">OutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BufferedOutputStream</span><span class="o">(</span><span class="k">new</span> <span class="n">FileOutputStream</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;C:/Temp/myfile.pdf&quot;</span><span class="o">)));</span>
+
+<span class="k">try</span> <span class="o">{</span>
+  <span class="c1">// Step 3: Construct fop with desired output format</span>
+  <span class="n">Fop</span> <span class="n">fop</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="na">newFop</span><span class="o">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="na">MIME_PDF</span><span class="o">,</span> <span class="n">out</span><span class="o">);</span>
+
+  <span class="c1">// Step 4: Setup JAXP using identity transformer</span>
+  <span class="n">TransformerFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">TransformerFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+  <span class="n">Transformer</span> <span class="n">transformer</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">newTransformer</span><span class="o">();</span> <span class="c1">// identity transformer</span>
+
+  <span class="c1">// Step 5: Setup input and output for XSLT transformation</span>
+  <span class="c1">// Setup input stream</span>
+  <span class="n">Source</span> <span class="n">src</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;C:/Temp/myfile.fo&quot;</span><span class="o">));</span>
+
+  <span class="c1">// Resulting SAX events (the generated FO) must be piped through to FOP</span>
+  <span class="n">Result</span> <span class="n">res</span> <span class="o">=</span> <span class="k">new</span> <span class="n">SAXResult</span><span class="o">(</span><span class="n">fop</span><span class="o">.</span><span class="na">getDefaultHandler</span><span class="o">());</span>
+
+  <span class="c1">// Step 6: Start XSLT transformation and FOP processing</span>
+  <span class="n">transformer</span><span class="o">.</span><span class="na">transform</span><span class="o">(</span><span class="n">src</span><span class="o">,</span> <span class="n">res</span><span class="o">);</span>
+
+<span class="o">}</span> <span class="k">finally</span> <span class="o">{</span>
+  <span class="c1">//Clean-up</span>
+  <span class="n">out</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+<span class="o">}</span>
 </pre></div>
 
 
@@ -412,20 +412,24 @@ We recently changed FOP's outer API to w
 </ul>
 <p>If you're not totally familiar with JAXP Transformers, please have a look at the <a href="#examples">Embedding examples</a> below. The section contains examples for all sorts of use cases. If you look at all of them in turn you should be able to see the patterns in use and the flexibility this approach offers without adding too much complexity.</p>
 <p>This may look complicated at first, but it's really just the combination of an XSL transformation and a FOP run. It's also easy to comment out the FOP part for debugging purposes, for example when you're tracking down a bug in your stylesheet. You can easily write the XSL-FO output from the XSL transformation to a file to check if that part generates the expected output. An example for that can be found in the <a href="#examples">Embedding examples</a> (See "ExampleXML2FO").</p>
-<h3 id="logging-wzxhzdk31wzxhzdk32">Logging <a id="basic-logging"></a></h3>
+<h3 id="logging-wzxhzdk32wzxhzdk33">Logging <a id="basic-logging"></a></h3>
 <p>Logging is now a little different than it was in FOP 0.20.5. We've switched from Avalon Logging to <a href="http://commons.apache.org/logging/">Jakarta Commons Logging</a> . While with Avalon Logging the loggers were directly given to FOP, FOP now retrieves its logger(s) through a statically available LogFactory. This is similar to the general pattern that you use when you work with Apache Log4J directly, for example. We call this "static logging" (Commons Logging, Log4J) as opposed to "instance logging" (Avalon Logging). This has a consequence: You can't give FOP a logger for each processing run anymore. The log output of multiple, simultaneously running FOP instances is sent to the same logger.
 We know this may be an issue in multi-threaded server environments if you'd like to know what's going on in every single FOP processing run. We're planning to add an additional feedback facility to FOP which can be used to obtain all sorts of specific feedback (validation messages, layout problems etc.). "Static logging" is mainly interesting for a developer working on FOP and for advanced users who are debugging FOP. We don't consider the logging output to be useful to normal FOP users. Please have some patience until we can add this feature or jump in and help us build it. We've set up a <a href="http://wiki.apache.org/xmlgraphics-fop/ProcessingFeedback">Wiki page</a> which documents what we're going to build.
 By default, <a href="http://commons.apache.org/logging/">Jakarta Commons Logging</a> uses JDK logging (available in JDKs 1.4 or higher) as its backend. You can configure Commons Logging to use an alternative backend, for example Log4J. Please consult the <a href="http://commons.apache.org/logging/">documentation for Jakarta Commons Logging</a> on how to configure alternative backends.</p>
-<h3 id="processing-xsl-fo-wzxhzdk33wzxhzdk34">Processing XSL-FO <a id="render"></a></h3>
+<h3 id="processing-xsl-fo-wzxhzdk34wzxhzdk35">Processing XSL-FO <a id="render"></a></h3>
 <p>Once the Fop instance is set up, call <code>getDefaultHandler()</code> to obtain a SAX DefaultHandler instance to which you can send the SAX events making up the XSL-FO document you'd like to render. FOP processing starts as soon as the DefaultHandler's <code>startDocument()</code> method is called. Processing stops again when the DefaultHandler's <code>endDocument()</code> method is called. Please refer to the basic usage pattern shown above to render a simple XSL-FO document.</p>
-<h3 id="processing-xsl-fo-generated-from-xmlxslt-wzxhzdk35wzxhzdk36">Processing XSL-FO generated from XML+XSLT <a id="render-with-xslt"></a></h3>
+<h3 id="processing-xsl-fo-generated-from-xmlxslt-wzxhzdk36wzxhzdk37">Processing XSL-FO generated from XML+XSLT <a id="render-with-xslt"></a></h3>
 <p>If you want to process XSL-FO generated from XML using XSLT we recommend again using standard JAXP to do the XSLT part and piping the generated SAX events directly through to FOP. The only thing you'd change to do that on the basic usage pattern above is to set up the Transformer differently:</p>
-<p>//without XSLT:
-  //Transformer transformer = factory.newTransformer(); // identity transformer</p>
-<p>//with XSLT:
-  Source xslt = new StreamSource(new File("mystylesheet.xsl"));
-  Transformer transformer = factory.newTransformer(xslt);</p>
-<h2 id="input-sources-wzxhzdk37wzxhzdk38">Input Sources <a id="input"></a></h2>
+<div class="codehilite"><pre><span class="c1">//without XSLT:</span>
+<span class="c1">//Transformer transformer = factory.newTransformer(); // identity transformer</span>
+
+<span class="c1">//with XSLT:</span>
+<span class="n">Source</span> <span class="n">xslt</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;mystylesheet.xsl&quot;</span><span class="o">));</span>
+<span class="n">Transformer</span> <span class="n">transformer</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">newTransformer</span><span class="o">(</span><span class="n">xslt</span><span class="o">);</span>
+</pre></div>
+
+
+<h2 id="input-sources-wzxhzdk38wzxhzdk39">Input Sources <a id="input"></a></h2>
 <p>The input XSL-FO document is always received by FOP as a SAX stream (see the <a href="../dev/design/parsing.html">Parsing Design Document</a> for the rationale).</p>
 <p>However, you may not always have your input document available as a SAX stream. But with JAXP it's easy to convert different input sources to a SAX stream so you can pipe it into FOP. That sounds more difficult than it is. You simply have to set up the right Source instance as input for the JAXP transformation. A few examples:</p>
 <ul>
@@ -452,9 +456,9 @@ By default, <a href="http://commons.apac
 </li>
 </ul>
 <p>There are a variety of upstream data manipulations possible. For example, you may have a DOM and an XSL stylesheet; or you may want to set variables in the stylesheet. Interface documentation and some cookbook solutions to these situations are provided in <a href="http://xml.apache.org/xalan-j/usagepatterns.html">Xalan Basic Usage Patterns</a> .</p>
-<h2 id="configuring-apache-fop-programmatically-wzxhzdk39wzxhzdk40">Configuring Apache FOP Programmatically <a id="config-internal"></a></h2>
+<h2 id="configuring-apache-fop-programmatically-wzxhzdk40wzxhzdk41">Configuring Apache FOP Programmatically <a id="config-internal"></a></h2>
 <p>Apache FOP provides two levels on which you can customize FOP's behaviour: the FopFactory and the user agent.</p>
-<h3 id="customizing-the-fopfactory-wzxhzdk41wzxhzdk42">Customizing the FopFactory <a id="fop-factory"></a></h3>
+<h3 id="customizing-the-fopfactory-wzxhzdk42wzxhzdk43">Customizing the FopFactory <a id="fop-factory"></a></h3>
 <p>The FopFactory holds configuration data and references to objects which are reusable over multiple rendering runs. It's important to instantiate it only once (except in special environments) and reuse it every time to create new FOUserAgent and Fop instances.</p>
 <p>You can set all sorts of things on the FopFactory:</p>
 <p>-
@@ -500,13 +504,13 @@ Set a <strong>URIResolver</strong> for c
 
 
 <p>Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FopFactory is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used if no other URIResolver (for example on the FOUserAgent) resolved the URI first.</p>
-<h3 id="customizing-the-user-agent-wzxhzdk43wzxhzdk44">Customizing the User Agent <a id="user-agent"></a></h3>
+<h3 id="customizing-the-user-agent-wzxhzdk44wzxhzdk45">Customizing the User Agent <a id="user-agent"></a></h3>
 <p>The user agent is the entity that allows you to interact with a single rendering run, i.e. the processing of a single document. If you wish to customize the user agent's behaviour, the first step is to create your own instance of FOUserAgent using the appropriate factory method on FopFactory and pass that to the factory method that will create a new Fop instance:</p>
-<div class="codehilite"><pre><span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span> <span class="sr">//</span> <span class="n">Reuse</span> <span class="n">the</span> <span class="n">FopFactory</span> <span class="k">if</span> <span class="n">possible</span><span class="o">!</span>
-<span class="sr">//</span> <span class="k">do</span> <span class="n">the</span> <span class="n">following</span> <span class="k">for</span> <span class="nb">each</span> <span class="k">new</span> <span class="n">rendering</span> <span class="n">run</span>
-<span class="n">FOUserAgent</span> <span class="n">userAgent</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="n">newFOUserAgent</span><span class="p">();</span>
-<span class="sr">//</span> <span class="n">customize</span> <span class="n">userAgent</span>
-<span class="n">Fop</span> <span class="n">fop</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="n">newFop</span><span class="p">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="n">MIME_POSTSCRIPT</span><span class="p">,</span> <span class="n">userAgent</span><span class="p">,</span> <span class="n">out</span><span class="p">);</span>
+<div class="codehilite"><pre><span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span> <span class="c1">// Reuse the FopFactory if possible!</span>
+<span class="c1">// do the following for each new rendering run</span>
+<span class="n">FOUserAgent</span> <span class="n">userAgent</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="na">newFOUserAgent</span><span class="o">();</span>
+<span class="c1">// customize userAgent</span>
+<span class="n">Fop</span> <span class="n">fop</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="na">newFop</span><span class="o">(</span><span class="n">MimeConstants</span><span class="o">.</span><span class="na">MIME_POSTSCRIPT</span><span class="o">,</span> <span class="n">userAgent</span><span class="o">,</span> <span class="n">out</span><span class="o">);</span>
 </pre></div>
 
 
@@ -578,34 +582,34 @@ Set a <strong>URIResolver</strong> for c
 
 
 <p>Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FOUserAgent is used for resolving URIs which are document-related. If it's not set or cannot resolve a URI, the URIResolver from the FopFactory is used. You should not reuse an FOUserAgent instance between FOP rendering runs although you can. Especially in multi-threaded environment, this is a bad idea.</p>
-<h2 id="using-a-configuration-file-wzxhzdk45wzxhzdk46">Using a Configuration File <a id="config-external"></a></h2>
+<h2 id="using-a-configuration-file-wzxhzdk46wzxhzdk47">Using a Configuration File <a id="config-external"></a></h2>
 <p>Instead of setting the parameters manually in code as shown above you can also set many values from an XML configuration file:</p>
-<div class="codehilite"><pre><span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">avalon</span><span class="o">.</span><span class="n">framework</span><span class="o">.</span><span class="n">configuration</span><span class="o">.</span><span class="n">Configuration</span><span class="p">;</span>
-<span class="nb">import</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">avalon</span><span class="o">.</span><span class="n">framework</span><span class="o">.</span><span class="n">configuration</span><span class="o">.</span><span class="n">DefaultConfigurationBuilder</span><span class="p">;</span>
+<div class="codehilite"><pre><span class="kn">import</span> <span class="nn">org.apache.avalon.framework.configuration.Configuration</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.avalon.framework.configuration.DefaultConfigurationBuilder</span><span class="o">;</span>
 
-<span class="sr">/*..*/</span>
+<span class="cm">/*..*/</span>
 
-<span class="n">DefaultConfigurationBuilder</span> <span class="n">cfgBuilder</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DefaultConfigurationBuilder</span><span class="p">();</span>
-<span class="n">Configuration</span> <span class="n">cfg</span> <span class="o">=</span> <span class="n">cfgBuilder</span><span class="o">.</span><span class="n">buildFromFile</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="s">&quot;C:/Temp/mycfg.xml&quot;</span><span class="p">));</span>
-<span class="n">fopFactory</span><span class="o">.</span><span class="n">setUserConfig</span><span class="p">(</span><span class="n">cfg</span><span class="p">);</span>
+<span class="n">DefaultConfigurationBuilder</span> <span class="n">cfgBuilder</span> <span class="o">=</span> <span class="k">new</span> <span class="n">DefaultConfigurationBuilder</span><span class="o">();</span>
+<span class="n">Configuration</span> <span class="n">cfg</span> <span class="o">=</span> <span class="n">cfgBuilder</span><span class="o">.</span><span class="na">buildFromFile</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;C:/Temp/mycfg.xml&quot;</span><span class="o">));</span>
+<span class="n">fopFactory</span><span class="o">.</span><span class="na">setUserConfig</span><span class="o">(</span><span class="n">cfg</span><span class="o">);</span>
 
-<span class="sr">/* ..or.. */</span>
+<span class="cm">/* ..or.. */</span>
 
-<span class="n">fopFactory</span><span class="o">.</span><span class="n">setUserConfig</span><span class="p">(</span><span class="k">new</span> <span class="n">File</span><span class="p">(</span><span class="s">&quot;C:/Temp/mycfg.xml&quot;</span><span class="p">));</span>
+<span class="n">fopFactory</span><span class="o">.</span><span class="na">setUserConfig</span><span class="o">(</span><span class="k">new</span> <span class="n">File</span><span class="o">(</span><span class="s">&quot;C:/Temp/mycfg.xml&quot;</span><span class="o">));</span>
 </pre></div>
 
 
 <p>The layout of the configuration file is described on the <a href="configuration.html">Configuration page</a> .</p>
-<h2 id="hints-wzxhzdk47wzxhzdk48">Hints <a id="hints"></a></h2>
-<h3 id="object-reuse-wzxhzdk49wzxhzdk50">Object reuse <a id="object-reuse"></a></h3>
+<h2 id="hints-wzxhzdk48wzxhzdk49">Hints <a id="hints"></a></h2>
+<h3 id="object-reuse-wzxhzdk50wzxhzdk51">Object reuse <a id="object-reuse"></a></h3>
 <p>Fop instances shouldn't (and can't) be reused. Please recreate Fop and FOUserAgent instances for each rendering run using the FopFactory. This is a cheap operation as all reusable information is held in the FopFactory. That's why it's so important to reuse the FopFactory instance.</p>
-<h3 id="awt-issues-wzxhzdk51wzxhzdk52">AWT issues <a id="awt"></a></h3>
+<h3 id="awt-issues-wzxhzdk52wzxhzdk53">AWT issues <a id="awt"></a></h3>
 <p>If your XSL-FO files contain SVG then Apache Batik will be used. When Batik is initialised it uses certain classes in <code>java.awt</code> that intialise the Java AWT classes. This means that a daemon thread is created by the JVM and on Unix it will need to connect to a DISPLAY.</p>
 <p>The thread means that the Java application may not automatically quit when finished, you will need to call <code>System.exit()</code> . These issues should be fixed in the JDK 1.4.</p>
 <p>If you run into trouble running FOP on a head-less server, please see the <a href="graphics.html#batik">notes on Batik</a> .</p>
-<h3 id="getting-information-on-the-rendering-process-wzxhzdk53wzxhzdk54">Getting information on the rendering process <a id="render-info"></a></h3>
+<h3 id="getting-information-on-the-rendering-process-wzxhzdk54wzxhzdk55">Getting information on the rendering process <a id="render-info"></a></h3>
 <p>To get the number of pages that were rendered by FOP you can call <code>Fop.getResults()</code> . This returns a <code>FormattingResults</code> object where you can look up the number of pages produced. It also gives you the page-sequences that were produced along with their id attribute and their numbers of pages. This is particularly useful if you render multiple documents (each enclosed by a page-sequence) and have to know the number of pages of each document.</p>
-<h2 id="improving-performance-wzxhzdk55wzxhzdk56">Improving performance <a id="performance"></a></h2>
+<h2 id="improving-performance-wzxhzdk56wzxhzdk57">Improving performance <a id="performance"></a></h2>
 <p>There are several options to consider:</p>
 <ul>
 <li>
@@ -624,35 +628,35 @@ Set a <strong>URIResolver</strong> for c
 <p>Fine-tune your stylesheet to make the XSLT process more efficient and to create XSL-FO that can be processed by FOP more efficiently. Less is more: Try to make use of property inheritance where possible.</p>
 </li>
 </ul>
-<h2 id="multithreading-fop-wzxhzdk57wzxhzdk58">Multithreading FOP <a id="multithreading"></a></h2>
+<h2 id="multithreading-fop-wzxhzdk58wzxhzdk59">Multithreading FOP <a id="multithreading"></a></h2>
 <p>Apache FOP may currently not be completely thread safe. The code has not been fully tested for multi-threading issues, yet. If you encounter any suspicious behaviour, please notify us.</p>
 <p>There is also a known issue with fonts being jumbled between threads when using the Java2D/AWT renderer (which is used by the -awt and -print output options). In general, you cannot safely run multiple threads through the AWT renderer.</p>
-<h2 id="examples-wzxhzdk59wzxhzdk60">Examples <a id="examples"></a></h2>
+<h2 id="examples-wzxhzdk60wzxhzdk61">Examples <a id="examples"></a></h2>
 <p>The directory "{fop-dir}/examples/embedding" contains several working examples.</p>
-<h3 id="examplefo2pdfjava-wzxhzdk61wzxhzdk62">ExampleFO2PDF.java <a id="ExampleFO2PDF"></a></h3>
+<h3 id="examplefo2pdfjava-wzxhzdk62wzxhzdk63">ExampleFO2PDF.java <a id="ExampleFO2PDF"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleFO2PDF.java?view=markup">example</a> demonstrates the basic usage pattern to transform an XSL-FO file to PDF using FOP.</p>
 <p><img alt="Example XSL-FO to PDF" src="images/EmbeddingExampleFO2PDF.png" /></p>
-<h3 id="examplexml2fojava-wzxhzdk63wzxhzdk64">ExampleXML2FO.java <a id="ExampleXML2FO"></a></h3>
+<h3 id="examplexml2fojava-wzxhzdk64wzxhzdk65">ExampleXML2FO.java <a id="ExampleXML2FO"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2FO.java?view=markup">example</a> has nothing to do with FOP. It is there to show you how an XML file can be converted to XSL-FO using XSLT. The JAXP API is used to do the transformation. Make sure you've got a JAXP-compliant XSLT processor in your classpath (ex. <a href="http://xml.apache.org/xalan-j">Xalan</a> ).</p>
 <p><img alt="Example XML to XSL-FO" src="images/EmbeddingExampleXML2FO.png" /></p>
-<h3 id="examplexml2pdfjava-wzxhzdk65wzxhzdk66">ExampleXML2PDF.java <a id="ExampleXML2PDF"></a></h3>
+<h3 id="examplexml2pdfjava-wzxhzdk66wzxhzdk67">ExampleXML2PDF.java <a id="ExampleXML2PDF"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java?view=markup">example</a> demonstrates how you can convert an arbitrary XML file to PDF using XSLT and XSL-FO/FOP. It is a combination of the first two examples above. The example uses JAXP to transform the XML file to XSL-FO and FOP to transform the XSL-FO to PDF.</p>
 <p><img alt="Example XML to PDF (via XSL-FO)" src="images/EmbeddingExampleXML2PDF.png" /></p>
 <p>The output (XSL-FO) from the XSL transformation is piped through to FOP using SAX events. This is the most efficient way to do this because the intermediate result doesn't have to be saved somewhere. Often, novice users save the intermediate result in a file, a byte array or a DOM tree. We strongly discourage you to do this if it isn't absolutely necessary. The performance is significantly higher with SAX.</p>
-<h3 id="exampleobj2xmljava-wzxhzdk67wzxhzdk68">ExampleObj2XML.java <a id="ExampleObj2XML"></a></h3>
+<h3 id="exampleobj2xmljava-wzxhzdk68wzxhzdk69">ExampleObj2XML.java <a id="ExampleObj2XML"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2XML.java?view=markup">example</a> is a preparatory example for the next one. It's an example that shows how an arbitrary Java object can be converted to XML. It's an often needed task to do this. Often people create a DOM tree from a Java object and use that. This is pretty straightforward. The example here, however, shows how to do this using SAX, which will probably be faster and not even more complicated once you know how this works.</p>
 <p><img alt="Example Java object to XML" src="images/EmbeddingExampleObj2XML.png" /></p>
 <p>For this example we've created two classes: ProjectTeam and ProjectMember (found in xml-fop/examples/embedding/java/embedding/model). They represent the same data structure found in xml-fop/examples/embedding/xml/xml/projectteam.xml. We want to serialize to XML a project team with several members which exist as Java objects. Therefore we created the two classes: ProjectTeamInputSource and ProjectTeamXMLReader (in the same place as ProjectTeam above).</p>
 <p>The XMLReader implementation (regard it as a special kind of XML parser) is responsible for creating SAX events from the Java object. The InputSource class is only used to hold the ProjectTeam object to be used.</p>
 <p>Have a look at the source of ExampleObj2XML.java to find out how this is used. For more detailed information see other resources on JAXP (ex. <a href="http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/3_generate.html">An older JAXP tutorial</a> ).</p>
-<h3 id="exampleobj2pdfjava-wzxhzdk69wzxhzdk70">ExampleObj2PDF.java <a id="ExampleObj2PDF"></a></h3>
+<h3 id="exampleobj2pdfjava-wzxhzdk70wzxhzdk71">ExampleObj2PDF.java <a id="ExampleObj2PDF"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java?view=markup">example</a> combines the previous and the third to demonstrate how you can transform a Java object to a PDF directly in one smooth run by generating SAX events from the Java object that get fed to an XSL transformation. The result of the transformation is then converted to PDF using FOP as before.</p>
 <p><img alt="Example Java object to PDF (via XML and XSL-FO)" src="images/EmbeddingExampleObj2PDF.png" /></p>
-<h3 id="exampledom2pdfjava-wzxhzdk71wzxhzdk72">ExampleDOM2PDF.java <a id="ExampleDOM2PDF"></a></h3>
+<h3 id="exampledom2pdfjava-wzxhzdk72wzxhzdk73">ExampleDOM2PDF.java <a id="ExampleDOM2PDF"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleDOM2PDF.java?view=markup">example</a> has FOP use a DOMSource instead of a StreamSource in order to use a DOM tree as input for an XSL transformation.</p>
-<h3 id="examplesvg2pdfjava-pdf-transcoder-example-wzxhzdk73wzxhzdk74">ExampleSVG2PDF.java (PDF Transcoder example) <a id="ExampleSVG2PDF"></a></h3>
+<h3 id="examplesvg2pdfjava-pdf-transcoder-example-wzxhzdk74wzxhzdk75">ExampleSVG2PDF.java (PDF Transcoder example) <a id="ExampleSVG2PDF"></a></h3>
 <p>This <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleSVG2PDF.java?view=markup">example</a> shows the usage of the PDF Transcoder, a sub-application within FOP. It is used to generate a PDF document from an SVG file.</p>
-<h3 id="final-notes-wzxhzdk75wzxhzdk76">Final notes <a id="example-notes"></a></h3>
+<h3 id="final-notes-wzxhzdk76wzxhzdk77">Final notes <a id="example-notes"></a></h3>
 <p>These examples should give you an idea of what's possible. It should be easy to adjust these examples to your needs. Also, if you have other examples that you think should be added here, please let us know via either the fop-users or fop-dev mailing lists. Finally, for more help please send your questions to the fop-users mailing list.</p></div>
       </div>
       

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/extensions.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/extensions.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/extensions.html Tue Dec  4 15:59:34 2012
@@ -350,8 +350,8 @@ All extensions require the correct use o
 <h2 id="fo-extensions-wzxhzdk6wzxhzdk7">FO Extensions <a id="fo-extensions"></a></h2>
 <h3 id="namespace-wzxhzdk8wzxhzdk9">Namespace <a id="fox-namespace"></a></h3>
 <p>By convention, FO extensions in FOP use the "fox" namespace prefix. To use any of the FO extensions, add a namespace entry for <code>http://xmlgraphics.apache.org/fop/extensions</code> to the root element:</p>
-<div class="codehilite"><pre><span class="o">&lt;</span><span class="n">fo:root</span> <span class="n">xmlns:fo</span><span class="o">=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
-           <span class="n">xmlns:fox</span><span class="o">=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions&quot;</span><span class="o">&gt;</span>
+<div class="codehilite"><pre><span class="nt">&lt;fo:root</span> <span class="na">xmlns:fo=</span><span class="s">&quot;http://www.w3.org/1999/XSL/Format&quot;</span>
+           <span class="na">xmlns:fox=</span><span class="s">&quot;http://xmlgraphics.apache.org/fop/extensions&quot;</span><span class="nt">&gt;</span>
 </pre></div>
 
 
@@ -448,7 +448,7 @@ This extension attribute doesn't work fo
 <h3 id="color-functions-wzxhzdk28wzxhzdk29">Color functions <a id="color-functions"></a></h3>
 <p>XSL-FO supports specifying color using the rgb(), rgb-icc() and system-color() functions. Apache FOP provides additional color functions for special use cases. Please note that using these functions compromises the interoperability of an FO document.</p>
 <h4 id="cmykwzxhzdk30wzxhzdk31">cmyk()<a id="color-function-cmyk"></a></h4>
-<p><code>color cmyk(numeric, numeric, numeric, numeric)</code> </p>
+<p><code>color cmyk(numeric, numeric, numeric, numeric)</code></p>
 <p>This function will construct a color in device-specific CMYK color space. The numbers must be between 0.0 and 1.0. For output formats that don't support device-specific color space the CMYK value is converted to an sRGB value.</p></div>
       </div>
       

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/fonts.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/fonts.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/fonts.html Tue Dec  4 15:59:34 2012
@@ -435,10 +435,10 @@ $(document).ready(function () {
 <p>Basic information about fonts can be found at:</p>
 <ul>
 <li>
-<p><a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a> </p>
+<p><a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a></p>
 </li>
 <li>
-<p><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a> </p>
+<p><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a></p>
 </li>
 </ul>
 <h2 id="basic-font-configuration-wzxhzdk24wzxhzdk25">Basic font configuration <a id="basics"></a></h2>
@@ -452,7 +452,7 @@ $(document).ready(function () {
   <span class="nt">&lt;directory</span> <span class="na">recursive=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>C:\MyFonts2<span class="nt">&lt;/directory&gt;</span>
 
   <span class="c">&lt;!-- automatically detect operating system installed fonts --&gt;</span>
-  <span class="nt">&lt;auto-detect/&gt;</span>  
+  <span class="nt">&lt;auto-detect/&gt;</span>
 <span class="nt">&lt;/fonts&gt;</span>
 </pre></div>
 
@@ -547,7 +547,7 @@ java -cp build\fop.jar;lib\avalon-framew
   <span class="nt">&lt;directory</span> <span class="na">recursive=</span><span class="s">&quot;true&quot;</span><span class="nt">&gt;</span>C:\MyFonts2<span class="nt">&lt;/directory&gt;</span>
 
   <span class="c">&lt;!-- automatically detect operating system installed fonts --&gt;</span>
-  <span class="nt">&lt;auto-detect/&gt;</span>  
+  <span class="nt">&lt;auto-detect/&gt;</span>
 <span class="nt">&lt;/fonts&gt;</span>
 </pre></div>
 

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/intermediate.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/intermediate.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/intermediate.html Tue Dec  4 15:59:34 2012
@@ -350,30 +350,30 @@ $(document).ready(function () {
 <p>As already mentioned, the IF is generated by using the <strong>XMLRenderer</strong> (MIME type: <strong>application/X-fop-areatree</strong> ). So, you basically set the right MIME type for the output format and process your FO files as if you would create a PDF file. However, there is an important detail to consider: The various Renderers don't all use the same font sources. To be able to create the right area tree for the ultimate output file, you need to create the IF file using the right font setup. This is achieved by telling the XMLRenderer to mimic another renderer. This is done by calling the XMLRenderer's mimicRenderer() method with an instance of the ultimate target renderer as the single parameter. This has a consequence: An IF file rendered with the Java2DRenderer may not look as expected when it was actually generated for the PDF renderer. For renderers that use the same font setup, this restriction does not apply (PDF and PS, for example). Generating the inte
 rmediate format file is the first step.</p>
 <p>The second step is to reparse the IF file using the <strong>AreaTreeParser</strong> which is found in the org.apache.fop.area package. The pages retrieved from the IF file are added to an AreaTreeModel instance from where they are normally rendered using one of the available Renderer implementations. You can find examples for the IF processing in the <a href="http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/">http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/intermediate/</a> directory in the FOP distribution</p>
 <p>The basic pattern to parse the IF format looks like this:</p>
-<div class="codehilite"><pre><span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="n">newInstance</span><span class="p">();</span>
+<div class="codehilite"><pre><span class="n">FopFactory</span> <span class="n">fopFactory</span> <span class="o">=</span> <span class="n">FopFactory</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
 
-<span class="sr">//</span> <span class="n">Setup</span> <span class="n">output</span>
-<span class="n">OutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">FileOutputStream</span><span class="p">(</span><span class="n">pdffile</span><span class="p">);</span>
-<span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span class="o">.</span><span class="n">io</span><span class="o">.</span><span class="n">BufferedOutputStream</span><span class="p">(</span><span class="n">out</span><span class="p">);</span>
-<span class="n">try</span> <span class="p">{</span>
-    <span class="sr">//</span><span class="n">Setup</span> <span class="n">fonts</span> <span class="ow">and</span> <span class="n">user</span> <span class="n">agent</span>
-    <span class="n">FontInfo</span> <span class="n">fontInfo</span> <span class="o">=</span> <span class="k">new</span> <span class="n">FontInfo</span><span class="p">();</span>
-    <span class="n">FOUserAgent</span> <span class="n">userAgent</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="n">newFOUserAgent</span><span class="p">();</span>
-
-    <span class="sr">//</span><span class="n">Construct</span> <span class="n">the</span> <span class="n">AreaTreeModel</span> <span class="n">that</span> <span class="n">will</span> <span class="n">received</span> <span class="n">the</span> <span class="n">individual</span> <span class="n">pages</span>
-    <span class="n">AreaTreeModel</span> <span class="n">treeModel</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RenderPagesModel</span><span class="p">(</span><span class="n">userAgent</span><span class="p">,</span> 
-            <span class="n">MimeConstants</span><span class="o">.</span><span class="n">MIME_PDF</span><span class="p">,</span> <span class="n">fontInfo</span><span class="p">,</span> <span class="n">out</span><span class="p">);</span>
-
-    <span class="sr">//</span><span class="n">Parse</span> <span class="n">the</span> <span class="n">IF</span> <span class="n">file</span> <span class="n">into</span> <span class="n">the</span> <span class="n">area</span> <span class="n">tree</span>
-    <span class="n">AreaTreeParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AreaTreeParser</span><span class="p">();</span>
-    <span class="n">Source</span> <span class="n">src</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="p">(</span><span class="n">myIFFile</span><span class="p">);</span>
-    <span class="n">parser</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">src</span><span class="p">,</span> <span class="n">treeModel</span><span class="p">,</span> <span class="n">userAgent</span><span class="p">);</span>
-
-    <span class="sr">//</span><span class="n">Signal</span> <span class="n">the</span> <span class="n">end</span> <span class="n">of</span> <span class="n">the</span> <span class="n">processing</span><span class="o">.</span> <span class="n">The</span> <span class="n">renderer</span> <span class="n">can</span> <span class="n">finalize</span> <span class="n">the</span> <span class="n">target</span> <span class="n">document</span><span class="o">.</span>
-    <span class="n">treeModel</span><span class="o">.</span><span class="n">endDocument</span><span class="p">();</span>
-<span class="p">}</span> <span class="n">finally</span> <span class="p">{</span>
-    <span class="n">out</span><span class="o">.</span><span class="nb">close</span><span class="p">();</span>
-<span class="p">}</span>
+<span class="c1">// Setup output</span>
+<span class="n">OutputStream</span> <span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span class="o">.</span><span class="na">io</span><span class="o">.</span><span class="na">FileOutputStream</span><span class="o">(</span><span class="n">pdffile</span><span class="o">);</span>
+<span class="n">out</span> <span class="o">=</span> <span class="k">new</span> <span class="n">java</span><span class="o">.</span><span class="na">io</span><span class="o">.</span><span class="na">BufferedOutputStream</span><span class="o">(</span><span class="n">out</span><span class="o">);</span>
+<span class="k">try</span> <span class="o">{</span>
+    <span class="c1">//Setup fonts and user agent</span>
+    <span class="n">FontInfo</span> <span class="n">fontInfo</span> <span class="o">=</span> <span class="k">new</span> <span class="n">FontInfo</span><span class="o">();</span>
+    <span class="n">FOUserAgent</span> <span class="n">userAgent</span> <span class="o">=</span> <span class="n">fopFactory</span><span class="o">.</span><span class="na">newFOUserAgent</span><span class="o">();</span>
+
+    <span class="c1">//Construct the AreaTreeModel that will received the individual pages</span>
+    <span class="n">AreaTreeModel</span> <span class="n">treeModel</span> <span class="o">=</span> <span class="k">new</span> <span class="n">RenderPagesModel</span><span class="o">(</span><span class="n">userAgent</span><span class="o">,</span>
+            <span class="n">MimeConstants</span><span class="o">.</span><span class="na">MIME_PDF</span><span class="o">,</span> <span class="n">fontInfo</span><span class="o">,</span> <span class="n">out</span><span class="o">);</span>
+
+    <span class="c1">//Parse the IF file into the area tree</span>
+    <span class="n">AreaTreeParser</span> <span class="n">parser</span> <span class="o">=</span> <span class="k">new</span> <span class="n">AreaTreeParser</span><span class="o">();</span>
+    <span class="n">Source</span> <span class="n">src</span> <span class="o">=</span> <span class="k">new</span> <span class="n">StreamSource</span><span class="o">(</span><span class="n">myIFFile</span><span class="o">);</span>
+    <span class="n">parser</span><span class="o">.</span><span class="na">parse</span><span class="o">(</span><span class="n">src</span><span class="o">,</span> <span class="n">treeModel</span><span class="o">,</span> <span class="n">userAgent</span><span class="o">);</span>
+
+    <span class="c1">//Signal the end of the processing. The renderer can finalize the target document.</span>
+    <span class="n">treeModel</span><span class="o">.</span><span class="na">endDocument</span><span class="o">();</span>
+<span class="o">}</span> <span class="k">finally</span> <span class="o">{</span>
+    <span class="n">out</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+<span class="o">}</span>
 </pre></div>
 
 

Modified: websites/staging/xmlgraphics/trunk/content/fop/0.95/metadata.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/0.95/metadata.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/0.95/metadata.html Tue Dec  4 15:59:34 2012
@@ -348,28 +348,28 @@ $(document).ready(function () {
 <p>As noted above, there's no officially recommended way to embed metadata in XSL-FO. Apache&trade; FOP supports embedding XMP in XSL-FO. Currently, only support for document-level metadata is implemented. Object-level metadata will be implemented when there's interest.</p>
 <p>Document-level metadata can be specified in the <code>fo:declarations</code> element. XMP specification recommends to use <code>x:xmpmeta</code> , <code>rdf:RDF</code> , and <code>rdf:Description</code> elements as shown in example below. Both <code>x:xmpmeta</code> and <code>rdf:RDF</code> elements are recognized as the top-level element introducing an XMP fragment (as per the XMP specification).</p>
 <h3 id="example-wzxhzdk7wzxhzdk8">Example <a id="xmp-example"></a></h3>
-<div class="codehilite"><pre><span class="k">[..]</span>
-<span class="err">&lt;/fo:layout-master-set&gt;</span>
-<span class="err">&lt;fo:declarations&gt;</span>
-  <span class="na">&lt;x:xmpmeta xmlns:x</span><span class="o">=</span><span class="s">&quot;adobe:ns:meta/&quot;&gt;</span>
-<span class="s">    &lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;</span>
-<span class="s">      &lt;rdf:Description rdf:about=&quot;&quot;</span>
-<span class="s">          xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;</span>
-<span class="s">        &lt;!-- Dublin Core properties go here --&gt;</span>
-<span class="s">        &lt;dc:title&gt;Document title&lt;/dc:title&gt;</span>
-<span class="s">        &lt;dc:creator&gt;Document author&lt;/dc:creator&gt;</span>
-<span class="s">        &lt;dc:description&gt;Document subject&lt;/dc:description&gt;</span>
-<span class="s">      &lt;/rdf:Description&gt;</span>
-<span class="s">      &lt;rdf:Description rdf:about=&quot;&quot;</span>
-<span class="s">          xmlns:xmp=&quot;http://ns.adobe.com/xap/1.0/&quot;&gt;</span>
-<span class="s">        &lt;!-- XMP properties go here --&gt;</span>
-<span class="s">        &lt;xmp:CreatorTool&gt;Tool used to make the PDF&lt;/xmp:CreatorTool&gt;</span>
-<span class="s">      &lt;/rdf:Description&gt;</span>
-<span class="s">    &lt;/rdf:RDF&gt;</span>
-<span class="s">  &lt;/x:xmpmeta&gt;</span>
-<span class="err">&lt;/fo:declarations&gt;</span>
-<span class="err">&lt;fo:page-sequence</span> <span class="err">...</span>
-<span class="k">[..]</span>
+<div class="codehilite"><pre>[..]
+<span class="nt">&lt;/fo:layout-master-set&gt;</span>
+<span class="nt">&lt;fo:declarations&gt;</span>
+  <span class="nt">&lt;x:xmpmeta</span> <span class="na">xmlns:x=</span><span class="s">&quot;adobe:ns:meta/&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;rdf:RDF</span> <span class="na">xmlns:rdf=</span><span class="s">&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;rdf:Description</span> <span class="na">rdf:about=</span><span class="s">&quot;&quot;</span>
+      <span class="na">xmlns:dc=</span><span class="s">&quot;http://purl.org/dc/elements/1.1/&quot;</span><span class="nt">&gt;</span>
+    <span class="c">&lt;!-- Dublin Core properties go here --&gt;</span>
+    <span class="nt">&lt;dc:title&gt;</span>Document title<span class="nt">&lt;/dc:title&gt;</span>
+    <span class="nt">&lt;dc:creator&gt;</span>Document author<span class="nt">&lt;/dc:creator&gt;</span>
+    <span class="nt">&lt;dc:description&gt;</span>Document subject<span class="nt">&lt;/dc:description&gt;</span>
+    <span class="nt">&lt;/rdf:Description&gt;</span>
+    <span class="nt">&lt;rdf:Description</span> <span class="na">rdf:about=</span><span class="s">&quot;&quot;</span>
+      <span class="na">xmlns:xmp=</span><span class="s">&quot;http://ns.adobe.com/xap/1.0/&quot;</span><span class="nt">&gt;</span>
+    <span class="c">&lt;!-- XMP properties go here --&gt;</span>
+    <span class="nt">&lt;xmp:CreatorTool&gt;</span>Tool used to make the PDF<span class="nt">&lt;/xmp:CreatorTool&gt;</span>
+    <span class="nt">&lt;/rdf:Description&gt;</span>
+  <span class="nt">&lt;/rdf:RDF&gt;</span>
+  <span class="nt">&lt;/x:xmpmeta&gt;</span>
+<span class="nt">&lt;/fo:declarations&gt;</span>
+<span class="nt">&lt;fo:page-sequence</span> <span class="err">...</span>
+<span class="err">[..]</span>
 </pre></div>
 
 
@@ -489,16 +489,16 @@ $(document).ready(function () {
 <h2 id="links-wzxhzdk13wzxhzdk14">Links <a id="links"></a></h2>
 <ul>
 <li>
-<p><a href="http://www.adobe.com/products/xmp/">Adobe's Extensible Metadata Platform (XMP) website</a> </p>
+<p><a href="http://www.adobe.com/products/xmp/">Adobe's Extensible Metadata Platform (XMP) website</a></p>
 </li>
 <li>
-<p><a href="http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf">Adobe XMP Specification</a> </p>
+<p><a href="http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf">Adobe XMP Specification</a></p>
 </li>
 <li>
-<p><a href="http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf">Adobe XMP Specification</a> </p>
+<p><a href="http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf">Adobe XMP Specification</a></p>
 </li>
 <li>
-<p><a href="http://dublincore.org/">http://dublincore.org/</a> </p>
+<p><a href="http://dublincore.org/">http://dublincore.org/</a></p>
 </li>
 </ul></div>
       </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message