Small distribution for Windows that requires Saxon and FOP to be downloaded and installed separately.
authorTony Graham
Thu, 25 Apr 2013 23:52:32 +0100
changeset 3 b7c884462c0c
parent 2 a48550fa1bac
child 4 e5eb1942c826
Small distribution for Windows that requires Saxon and FOP to be downloaded and installed separately.
FOPRunXSLTExt/build-nonb.xml
FOPRunXSLTExt/examples/README
FOPRunXSLTExt/examples/runsaxon9he_fop10.bat
--- a/FOPRunXSLTExt/build-nonb.xml	Sat Apr 20 18:49:25 2013 +0100
+++ b/FOPRunXSLTExt/build-nonb.xml	Thu Apr 25 23:52:32 2013 +0100
@@ -3,7 +3,7 @@
 <project name="FOPRunXSLTExt-nonb" default="default" basedir=".">
     <description>Builds, tests, and runs the project FOPRunXSLTExt.</description>
 
-    <property name="zip.version" value="0.0.1" />
+    <property name="zip.version" value="0.0.2" />
 
     <import file="build.xml"/>
 
@@ -42,7 +42,7 @@
     <target name="zip.windows">
       <zip destfile="FOPRunXSLTExt-windows-${zip.version}.zip">
 	<zipfileset dir="examples"
-		    includes="runsaxon9he_fop10.bat FOPRunXSLTExt.jar README example1*.* lib/** out"
+		    includes="runsaxon9he_fop10.bat FOPRunXSLTExt.jar README example1*.* out"
 		    prefix="FOPRunXSLTExt-windows-${zip.version}" />
       </zip>
     </target>
--- a/FOPRunXSLTExt/examples/README	Sat Apr 20 18:49:25 2013 +0100
+++ b/FOPRunXSLTExt/examples/README	Thu Apr 25 23:52:32 2013 +0100
@@ -1,4 +1,60 @@
-Usage:
+FOPRunXSLTExt
+
+Produced by the Print and Page Layout Community Group at W3C.  See
+http://www.w3.org/community/ppl/.
+
+FOPRunXSLTExt is an (early) experiment in getting the area tree from
+an XSL formatter run as the result of calling an XSLT extension
+function in the same XSLT transform as will produce the "final" FO
+tree to be output for formatting as human readable pages.
+
+It was initially developed by Arved Sandstrom of MagicLamp Software
+following discussion on the public-ppl@w3.org mailing list. Further
+development now happens in the 'ppl' Mercurial repository at
+https://dvcs.w3.org/hg/ppl.
+
+FOPRunXSLTExt is written in Java and uses the Apache FOP XSL formatter
+to produce the area trees
+
+Prerequisites:
+
+1. Java runtime
+
+2. Saxon 9.4 (or later) HE jar
+
+3. FOP 1.0 XSL formatter.
+
+
+Windows:
+
+1. Get and install Java JRE
+
+2. Get and install Saxon
+
+   Saxon-HE is available from http://saxon.sourceforge.net/ as a
+   Zip-encoded archive.  Download the Zip file and extract its
+   contents onto your local disk.
+
+3. Get and install FOP 1.0
+
+   FOP distributions are available from
+   http://xmlgraphics.apache.org/fop/download.html.  Download the
+   binary distribution of FOP 1.0 and extract its contents onto your
+   local disk.
+
+4. Edit 'runsaxon9he_fop10.bat' so the line beginning "set SAXON=" has
+   the correct path to the Saxon-HE jar file on your system and so the
+   line beginning "set FOP_HOME=" has the correct path to the
+   "fop-1.0" folder that you extracted from the FOP binary
+   distribution.
+
+5. In the same directory as 'runsaxon9he_fop10.bat', run the following
+   command:
+
+      runsaxon9he_fop10.bat example1.xml example1_saxon9_fop10.xsl out/example1_saxon9_fop10.if out example1_saxon9_fop10.if
+
+
+Linux/Unix:
 
 1. This extension is designed to be compiled against FOP 1.0.
 
--- a/FOPRunXSLTExt/examples/runsaxon9he_fop10.bat	Sat Apr 20 18:49:25 2013 +0100
+++ b/FOPRunXSLTExt/examples/runsaxon9he_fop10.bat	Thu Apr 25 23:52:32 2013 +0100
@@ -1,1 +1,27 @@
-java -cp FOPRunXSLTExt.jar;lib\saxon9he.jar;lib\xalan2-2.7.1.jar;lib\fop-1.0.jar;lib\xmlgraphics-commons-1.4.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.1.1.jar;lib\batik-all-1.7.jar;lib\commons-io-1.4.jar;lib\serializer-2.7.1.jar net.sf.saxon.Transform -init:org.w3c.ppl.xslt.ext.fop.saxon.RunFOPExtInitializer -s:%1 -xsl:%2 -o:%3 dest_dir=%4 area_tree_filename=%5
+@ECHO OFF
+
+rem The current directory
+set FOPRUNXSLTEXT_HOME=%~dp0
+
+rem Saxon 9.4 or later jar file.  Modify as
+rem necessary for location of Saxon jar on your
+rem system.
+set SAXON=C:\saxon\saxon9he.jar
+
+rem Location of unzipped FOP 1.0 binary distribution.
+set FOP_HOME=%~dp0\fop-1.0
+
+rem Set the classpath for use by Java.
+set CP=%SAXON%
+set CP=%CP%;%FOP_HOME%\build\fop.jar
+set CP=%CP%;%FOP_HOME%\lib\xmlgraphics-commons-1.4.jar
+set CP=%CP%;%FOP_HOME%\lib\commons-logging-1.0.4.jar
+set CP=%CP%;%FOP_HOME%\lib\commons-io-1.3.1.jar
+set CP=%CP%;%FOP_HOME%\lib\avalon-framework-4.2.0.jar
+set CP=%CP%;%FOP_HOME%\lib\batik-all-1.7.jar
+set CP=%CP%;%FOP_HOME%\lib\serializer-2.7.0.jar
+set CP=%CP%;%FOP_HOME%\lib\xalan-2.7.0.jar
+set CP=%CP%;%FOP_HOME%\lib\xerxesImpl-2.7.1.jar
+set CP=%CP%;%FOPRUNXSLTEXT_HOME%\FOPRunXSLTExt.jar
+
+java -cp %CP% net.sf.saxon.Transform -init:org.w3c.ppl.xslt.ext.fop.saxon.RunFOPExtInitializer -s:%1 -xsl:%2 -o:%3 dest_dir=%4 area_tree_filename=%5