Index: Fop.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/tools/anttasks/Fop.java,v
retrieving revision 1.11
diff -r1.11 Fop.java
11a12
> import org.apache.tools.ant.types.FileSet;
43c44,45
<  * <li>pdffile -> output filename</li>
---
>  * <li>format -> MIME type of the format to generate ex. "application/pdf"</li>
>  * <li>outfile -> output filename</li>
50c52,55
<     File pdfFile;
---
>     Vector filesets = new Vector();
>     File outFile;
>     File outDir;
>     String format; //MIME type
61a67
> 
66,69d71
<         if (foFile == null) {
<             log("fofile attribute is not set", Project.MSG_ERR);
<             throw new BuildException("fofile attribute is not set");
<         }
72a75,83
> 
>     /**
>      * Adds a set of fo files (nested fileset attribute).
>      */
>     public void addFileset(FileSet set) {
>         filesets.addElement(set);
>     }
> 
> 
77,78c88,89
<     public void setPdffile(File pdfFile) {
<         this.pdfFile = pdfFile;
---
>     public void setOutfile(File outFile) {
>         this.outFile = outFile;
80a92
> 
82c94
<      * Sets the output file
---
>      * Gets the output file
84,89c96,106
<     public File getPdffile() {
<         if (pdfFile == null) {
<             log("pdffile attribute is not set", Project.MSG_ERR);
<             throw new BuildException("pdffile attribute is not set");
<         }
<         return pdfFile;
---
>     public File getOutfile() {
>         return this.outFile;
>     }
> 
> 
>     /**
>      * Sets the output directory
>      * @param Directory to output to
>      */
>     public void setOutdir(File outDir) {
>         this.outDir = outDir;
91a109,133
> 
>     /**
>      * Gets the output directory
>      */
>     public File getOutdir() {
>         return this.outDir;
>     }
> 
> 
>     /**
>      * Sets output format (MIME type)
>      */
>     public void setFormat(String format) {
>         this.format = format;
>     }
> 
> 
>     /**
>      * Gets the output format (MIME type)
>      */
>     public String getFormat() {
>         return this.format;
>     }
> 
> 
109a152
> 
117a161
> 
125a170
> 
132a178
> 
147a194
> 
175a223,278
> 
>     private int determineRenderer(String format) {
>         if ((format == null) ||
>                 format.equalsIgnoreCase("application/pdf") ||
>                 format.equalsIgnoreCase("pdf")) {
>             return Driver.RENDER_PDF;
>         } else if (format.equalsIgnoreCase("application/postscript") ||
>                 format.equalsIgnoreCase("ps")) {
>             return Driver.RENDER_PS;
>         } else if (format.equalsIgnoreCase("application/vnd.mif") ||
>                 format.equalsIgnoreCase("mif")) {
>             return Driver.RENDER_MIF;
>         } else if (format.equalsIgnoreCase("application/vnd.gp-PCL") ||
>                 format.equalsIgnoreCase("pcl")) {
>             return Driver.RENDER_PCL;
>         } else if (format.equalsIgnoreCase("text/plain") ||
>                 format.equalsIgnoreCase("txt")) {
>             return Driver.RENDER_TXT;
>         } else if (format.equalsIgnoreCase("text/xml") ||
>                 format.equalsIgnoreCase("at") ||
>                 format.equalsIgnoreCase("xml")) {
>             return Driver.RENDER_XML;
>         } else {
>             String err = "Couldn't determine renderer to use: "+format;
>             log.error(err);
>             throw new BuildException(err);
>         }
>     }
> 
> 
>     private String determineExtension(int renderer) {
>         switch (renderer) {
>             case Driver.RENDER_PDF: return ".pdf";
>             case Driver.RENDER_PS:  return ".ps";
>             case Driver.RENDER_MIF: return ".mif";
>             case Driver.RENDER_PCL: return ".pcl";
>             case Driver.RENDER_TXT: return ".txt";
>             case Driver.RENDER_XML: return ".xml";
>             default:
>                String err = "Unknown renderer: "+renderer;
>                log.error(err);
>                throw new BuildException(err);
>         }
>     }
> 
> 
>     private File replaceExtension(File file, String expectedExt, String newExt) {
>         String name = file.getName();
>         if (name.toLowerCase().endsWith(expectedExt)) {
>             name = name.substring(0, name.length()-expectedExt.length());
>         }
>         name = name.concat(newExt);
>         return new File(file.getParentFile(), name);
>     }
> 
> 
185c288,336
<         InputHandler inputHandler = new FOInputHandler(task.getFofile());
---
>         task.log("Using base directory: "
>                  + Configuration.getValue("baseDir"), Project.MSG_DEBUG);
> 
>         int rint = determineRenderer(task.getFormat());
>         String newExtension = determineExtension(rint);
> 
>         int actioncount = 0;
> 
>         // deal with single source file
>         if (task.getFofile() != null) {
>             if (task.getFofile().exists()) {
>                 File outf = task.getOutfile();
>                 if (outf == null) {
>                     throw new BuildException("outfile is required when fofile is used");
>                 }
>                 if (task.getOutdir() != null) {
>                     outf = new File(task.getOutdir(), outf.getName());
>                 }
>                 render(task.getFofile(), outf, rint);
>                 actioncount++;
>             }
>         }
> 
>         // deal with the filesets
>         for (int i=0; i<task.filesets.size(); i++) {
>             FileSet fs = (FileSet)task.filesets.elementAt(i);
>             DirectoryScanner ds = fs.getDirectoryScanner(task.getProject());
>             String[] files = ds.getIncludedFiles();
> 
>             for (int j=0; j<files.length; j++) {
>                 File f = new File(fs.getDir(task.getProject()), files[j]);
>                 File outf = replaceExtension(f, ".fo", newExtension);
>                 if (task.getOutdir() != null) {
>                     outf = new File(task.getOutdir(), outf.getName());
>                 }
>                 render(f, outf, rint);
>                 actioncount++;
>             }
>         }
> 
>         if (actioncount == 0) {
>             task.log("No files processed. No files were selected by the filesets and no fofile was set."
>                      , Project.MSG_WARN);
>         }
>     }
> 
> 
>     private void render(File foFile, File outFile, int renderer) throws FOPException {
>         InputHandler inputHandler = new FOInputHandler(foFile);
189c340
<         FileOutputStream pdfOut = null;
---
>         FileOutputStream out = null;
191c342
<             pdfOut = new FileOutputStream(task.getPdffile());
---
>             out = new FileOutputStream(outFile);
193c344
<             log.error("Failed to open " + task.getPdffile());
---
>             log.error("Failed to open " + outFile);
197,200c348
<         task.log("Using base directory: "
<                  + Configuration.getValue("baseDir"), Project.MSG_DEBUG);
<         task.log(task.getFofile().getName() + " -> "
<                  + task.getPdffile().getName(), Project.MSG_INFO);
---
>         task.log(foFile + " -> " + outFile, Project.MSG_INFO);
203c351
<             Driver driver = new Driver(inputHandler.getInputSource(), pdfOut);
---
>             Driver driver = new Driver(inputHandler.getInputSource(), out);
205c353
<             driver.setRenderer(Driver.RENDER_PDF);
---
>             driver.setRenderer(renderer);
207a356
>             out.close();
209c358
<             log.error("Couldn't render pdf: " + ex.getMessage());
---
>             log.error("Couldn't render file: " + ex.getMessage());
Index: build.xml
===================================================================
RCS file: /home/cvspublic/xml-fop/docs/examples/build.xml,v
retrieving revision 1.18
diff -r1.18 build.xml
2d1
< 
4,123c3,124
< 
< <project default="creating new test pdf files" basedir=".">
< 
<   <!-- =================================================================== -->
<   <!-- Initialization target                                               -->
<   <!-- =================================================================== -->
<   <target name="init">
<     <tstamp/>
<     <mkdir dir="tests"/>
<     <property name="referenceDir" value="reference"/>
<     <property name="testDir" value="tests"/>
<     <property name="foDir" value="fo"/>
<     <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
<     <taskdef name="compare" classname="org.apache.fop.tools.anttasks.Compare"/>
< 
< 
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Help on usage                                                       -->
<   <!-- =================================================================== -->
<   <target name="usage">
<     <echo message=""/>
<     <echo message=""/>
<     <echo message="USAGE of runtests"/>
<     <echo message="-------------------------------------------------------------"/>
<     <echo message=""/>
<     <echo message=" available targets are:"/>
<     <echo message=""/>
<     <echo message="   compare  --> generates new pdf test files and compares them to reference files (default)"/>
<     <echo message="   reference --> generates new reference pdf files"/>
<     <echo message=" See the comments inside the build.xml file for more details."/>
<     <echo message="-------------------------------------------------------------"/>
<     <echo message=""/>
<     <echo message=""/>
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Produces new test pdf files                                         -->
<   <!-- =================================================================== -->
<   <target name="creating new test pdf files" depends="init">
<     <fop fofile="${foDir}/normal.fo" pdffile="${testDir}/normal.pdf"/>
<     <fop fofile="${foDir}/table.fo"  pdffile="${testDir}/table.pdf"/>
<     <fop fofile="${foDir}/list.fo"   pdffile="${testDir}/list.pdf"/>
<     <fop fofile="${foDir}/link.fo"   pdffile="${testDir}/link.pdf"/> 
<     <fop fofile="${foDir}/newlinktest.fo" pdffile="${testDir}/newlinktest.pdf"/>
<     <fop fofile="${foDir}/border.fo"   pdffile="${testDir}/border.pdf"/> 
<     <fop fofile="${foDir}/extensive.fo"   pdffile="${testDir}/extensive.pdf"/> 
<     <fop fofile="${foDir}/images.fo"   pdffile="${testDir}/images.pdf"/> 
<     <fop fofile="${foDir}/readme.fo"   pdffile="${testDir}/readme.pdf"/> 
<     <fop fofile="${foDir}/fonts.fo"   pdffile="${testDir}/fonts.pdf"/> 
<     <fop fofile="${foDir}/leader.fo"   pdffile="${testDir}/leader.pdf"/> 
<     <fop fofile="${foDir}/textdeko.fo"   pdffile="${testDir}/textdeko.pdf"/> 
<     <fop fofile="${foDir}/inhprop.fo" pdffile="${testDir}/inhprop.pdf"/>
<     <fop fofile="${foDir}/normalex.fo" pdffile="${testDir}/normalex.pdf"/>
<     <fop fofile="${foDir}/simple.fo" pdffile="${testDir}/simple.pdf"/>
<     <!-- <fop fofile="${foDir}/hyphen.fo" pdffile="${testDir}/hyphen.pdf"/> -->
<     <fop fofile="${foDir}/character.fo" pdffile="${testDir}/character.pdf"/>
<     <fop fofile="${foDir}/pdfoutline.fo" pdffile="${testDir}/pdfoutline.pdf"/>
<     <fop fofile="${foDir}/corresprop.fo" pdffile="${testDir}/corresprop.pdf"/>
<     <fop fofile="${foDir}/bordershorthand.fo" pdffile="${testDir}/bordershorthand.pdf"/>
<   </target>
< 
< 
<   <target name="image" depends="init">
<     <fop fofile="${foDir}/images.fo"   pdffile="${testDir}/images.pdf"/> 
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Compares new test pdf files to reference pdf files                  -->
<   <!-- =================================================================== -->
<   <target name="compare" depends ="creating new test pdf files">
<     <compare referenceDirectory  = "${referenceDir}" 
<              testDirectory       = "${testDir}" 
<              filenames           = "normal.pdf,table.pdf,list.pdf,link.pdf,border.pdf,images.pdf,extensive.pdf,readme.pdf,fonts.pdf,list2.pdf"/>
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Produces new reference pdf files                                         -->
<   <!-- =================================================================== -->
<   <target name="reference">
<     <fop fofile="${foDir}/normal.fo" pdffile="${referenceDir}/normal.pdf"/>
<     <fop fofile="${foDir}/table.fo"  pdffile="${referenceDir}/table.pdf"/>
<     <fop fofile="${foDir}/list.fo"   pdffile="${referenceDir}/list.pdf"/>
<     <fop fofile="${foDir}/link.fo"   pdffile="${referenceDir}/link.pdf"/>
<     <fop fofile="${foDir}/newlinktest.fo"   pdffile="${referenceDir}/newlinktest.pdf"/>
<     <fop fofile="${foDir}/border.fo"   pdffile="${referenceDir}/border.pdf"/>
<     <fop fofile="${foDir}/extensive.fo"   pdffile="${referenceDir}/extensive.pdf"/>
<     <fop fofile="${foDir}/images.fo"   pdffile="${referenceDir}/images.pdf"/>
<     <fop fofile="${foDir}/readme.fo"   pdffile="${referenceDir}/readme.pdf"/>
<     <fop fofile="${foDir}/fonts.fo"   pdffile="${referenceDir}/fonts.pdf"/>     
<     <fop fofile="${foDir}/leader.fo"   pdffile="${referenceDir}/leader.pdf"/> 
<     <fop fofile="${foDir}/textdeko.fo"   pdffile="${referenceDir}/textdeko.pdf"/> 
<     <fop fofile="${foDir}/inhprop.fo"   pdffile="${referenceDir}/inhprop.pdf"/> 
<     <fop fofile="${foDir}/normalex.fo"   pdffile="${referenceDir}/normalex.pdf"/> 
<     <fop fofile="${foDir}/simple.fo"   pdffile="${referenceDir}/simple.pdf"/> 
<     <!-- <fop fofile="${foDir}/hyphen.fo" pdffile="${referenceDir}/hyphen.pdf"/> -->
<     <fop fofile="${foDir}/character.fo" pdffile="${referenceDir}/character.pdf"/>
< 
<   </target>
< 
< 
< 
< 
<   <!-- =================================================================== -->
<   <!-- Starts the test                                                     -->
<   <!-- =================================================================== -->
<   <target name="runtest" depends="compare">
<     <echo message="Running Fop tests"/>
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Clean targets                                                       -->
<   <!-- =================================================================== -->
<   <target name="clean" depends="init">
<     <delete dir="${testDir}"/>
<     
<   </target>
< 
< 
---
> <project default="newPDF" basedir=".">
> 	<!-- =================================================================== -->
> 	<!-- Initialization target                                               -->
> 	<!-- =================================================================== -->
> 	<target name="init">
> 		<tstamp/>
> 		<mkdir dir="tests"/>
> 		<property name="referenceDir" value="reference"/>
> 		<property name="testDir" value="tests"/>
> 		<property name="foDir" value="fo"/>
> 		<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
> 		<taskdef name="compare" classname="org.apache.fop.tools.anttasks.Compare"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Help on usage                                                       -->
> 	<!-- =================================================================== -->
> 	<target name="usage">
> 		<echo message=""/>
> 		<echo message=""/>
> 		<echo message="USAGE of runtests"/>
> 		<echo message="-------------------------------------------------------------"/>
> 		<echo message=""/>
> 		<echo message=" available targets are:"/>
> 		<echo message=""/>
> 		<echo message="   newPDF  --> generates new PDF test files (default)"/>
> 		<echo message="   newPS  --> generates new PostScript test files"/>
> 		<echo message="   newAT  --> generates new AreaTree (XML) test files"/>
> 		<echo message="   comparePDF  --> generates new PDF test files and compares them to reference files"/>
> 		<echo message="   referencePDF --> generates new reference PDF files"/>
> 		<echo message=" See the comments inside the build.xml file for more details."/>
> 		<echo message="-------------------------------------------------------------"/>
> 		<echo message=""/>
> 		<echo message=""/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Produces new test pdf files                                         -->
> 	<!-- =================================================================== -->
> 	<target name="newPDF" depends="init">
> 		<fop fofile="${foDir}/normal.fo" outfile="${testDir}/normal.pdf"/>
> 		<fop fofile="${foDir}/table.fo" outfile="${testDir}/table.pdf"/>
> 		<fop fofile="${foDir}/list.fo" outfile="${testDir}/list.pdf"/>
> 		<fop fofile="${foDir}/link.fo" outfile="${testDir}/link.pdf"/>
> 		<fop fofile="${foDir}/newlinktest.fo" outfile="${testDir}/newlinktest.pdf"/>
> 		<fop fofile="${foDir}/border.fo" outfile="${testDir}/border.pdf"/>
> 		<fop fofile="${foDir}/extensive.fo" outfile="${testDir}/extensive.pdf"/>
> 		<fop fofile="${foDir}/images.fo" outfile="${testDir}/images.pdf"/>
> 		<fop fofile="${foDir}/readme.fo" outfile="${testDir}/readme.pdf"/>
> 		<fop fofile="${foDir}/fonts.fo" outfile="${testDir}/fonts.pdf"/>
> 		<fop fofile="${foDir}/leader.fo" outfile="${testDir}/leader.pdf"/>
> 		<fop fofile="${foDir}/textdeko.fo" outfile="${testDir}/textdeko.pdf"/>
> 		<fop fofile="${foDir}/inhprop.fo" outfile="${testDir}/inhprop.pdf"/>
> 		<fop fofile="${foDir}/normalex.fo" outfile="${testDir}/normalex.pdf"/>
> 		<fop fofile="${foDir}/simple.fo" outfile="${testDir}/simple.pdf"/>
> 		<!-- <fop fofile="${foDir}/hyphen.fo" outfile="${testDir}/hyphen.pdf"/> -->
> 		<fop fofile="${foDir}/character.fo" outfile="${testDir}/character.pdf"/>
> 		<fop fofile="${foDir}/pdfoutline.fo" outfile="${testDir}/pdfoutline.pdf"/>
> 		<fop fofile="${foDir}/corresprop.fo" outfile="${testDir}/corresprop.pdf"/>
> 		<fop fofile="${foDir}/bordershorthand.fo" outfile="${testDir}/bordershorthand.pdf"/>
> 	</target>
> 	<target name="image" depends="init">
> 		<fop fofile="${foDir}/images.fo" outfile="${testDir}/images.pdf"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Produces new test ps files                                         -->
> 	<!-- =================================================================== -->
> 	<target name="newPS" depends="init">
> 		<fop format="application/postscript" outdir="${testDir}">
> 			<fileset dir="${foDir}">
> 				<include name="**/*.fo"/>
> 			</fileset>
> 		</fop>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Produces new test areatree files                                         -->
> 	<!-- =================================================================== -->
> 	<target name="newAT" depends="init">
> 		<fop format="text/xml" outdir="${testDir}">
> 			<fileset dir="${foDir}">
> 				<include name="**/*.fo"/>
> 			</fileset>
> 		</fop>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Compares new test pdf files to reference pdf files                  -->
> 	<!-- =================================================================== -->
> 	<target name="comparePDF" depends="newPDF">
> 		<compare referenceDirectory="${referenceDir}" testDirectory="${testDir}" filenames="normal.pdf,table.pdf,list.pdf,link.pdf,border.pdf,images.pdf,extensive.pdf,readme.pdf,fonts.pdf,list2.pdf"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Produces new reference pdf files                                         -->
> 	<!-- =================================================================== -->
> 	<target name="referencePDF">
> 		<fop fofile="${foDir}/normal.fo" outfile="${referenceDir}/normal.pdf"/>
> 		<fop fofile="${foDir}/table.fo" outfile="${referenceDir}/table.pdf"/>
> 		<fop fofile="${foDir}/list.fo" outfile="${referenceDir}/list.pdf"/>
> 		<fop fofile="${foDir}/link.fo" outfile="${referenceDir}/link.pdf"/>
> 		<fop fofile="${foDir}/newlinktest.fo" outfile="${referenceDir}/newlinktest.pdf"/>
> 		<fop fofile="${foDir}/border.fo" outfile="${referenceDir}/border.pdf"/>
> 		<fop fofile="${foDir}/extensive.fo" outfile="${referenceDir}/extensive.pdf"/>
> 		<fop fofile="${foDir}/images.fo" outfile="${referenceDir}/images.pdf"/>
> 		<fop fofile="${foDir}/readme.fo" outfile="${referenceDir}/readme.pdf"/>
> 		<fop fofile="${foDir}/fonts.fo" outfile="${referenceDir}/fonts.pdf"/>
> 		<fop fofile="${foDir}/leader.fo" outfile="${referenceDir}/leader.pdf"/>
> 		<fop fofile="${foDir}/textdeko.fo" outfile="${referenceDir}/textdeko.pdf"/>
> 		<fop fofile="${foDir}/inhprop.fo" outfile="${referenceDir}/inhprop.pdf"/>
> 		<fop fofile="${foDir}/normalex.fo" outfile="${referenceDir}/normalex.pdf"/>
> 		<fop fofile="${foDir}/simple.fo" outfile="${referenceDir}/simple.pdf"/>
> 		<!-- <fop fofile="${foDir}/hyphen.fo" outfile="${referenceDir}/hyphen.pdf"/> -->
> 		<fop fofile="${foDir}/character.fo" outfile="${referenceDir}/character.pdf"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Starts the test                                                     -->
> 	<!-- =================================================================== -->
> 	<target name="runtest" depends="comparePDF">
> 		<echo message="Running Fop tests"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Clean targets                                                       -->
> 	<!-- =================================================================== -->
> 	<target name="clean" depends="init">
> 		<delete dir="${testDir}"/>
> 	</target>
125d125
< 
Index: build.xml
===================================================================
RCS file: /home/cvspublic/xml-fop/docs/xml-docs/build.xml,v
retrieving revision 1.4
diff -r1.4 build.xml
2d1
< 
15,16d13
< 
< 
18,70c15,53
< 
<   <!-- =================================================================== -->
<   <!-- Initialization target                                               -->
<   <!-- =================================================================== -->
<   <target name="init">
<     <tstamp/>
< 
<     <property name="src.dir" value="./fop"/>
<     <property name="allfiles.xml" value="fop-doc.xml"/>
<     <property name="outfile.fo" value="fop.fo"/>
<     <property name="outfile.pdf" value="fop.pdf"/>
< 
<     <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
<     <taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/>
< 
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- copies all xml files into one. the infile is a dummy, because the   -->
<   <!-- source files are defined in the stylesheet                          -->
<   <!-- =================================================================== -->
<   <target name="prepare-files" depends="init">
<     <xslt infile="fop.xml" xsltfile="xml2xml.xsl"
<         outfile="${allfiles.xml}" smart="yes"/>
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Generates the fo file                                               -->
<   <!-- =================================================================== -->
<   <target name="fo" depends="prepare-files">
<     <xslt infile="${allfiles.xml}" xsltfile="xml2pdf.xsl"
<         outfile="${outfile.fo}" smart="yes"/>
<   </target>
< 
< 
<   <!-- =================================================================== -->
<   <!-- Generates the pdf file                                              -->
<   <!-- =================================================================== -->
<   <target name="pdf" depends="fo">
<     <fop fofile="${outfile.fo}"   pdffile="${outfile.pdf}"/> 
<   </target>
< 
< 
< 
<   <!-- =================================================================== -->
<   <!-- Clean targets                                                       -->
<   <!-- =================================================================== -->
<   <target name="clean">
<     <delete file="${allfiles.xml}"/>
<     <delete file="${outfile.fo}"/>
<     <delete file="${outfile.pdf}"/>
<   </target>
< 
---
> 	<!-- =================================================================== -->
> 	<!-- Initialization target                                               -->
> 	<!-- =================================================================== -->
> 	<target name="init">
> 		<tstamp/>
> 		<property name="src.dir" value="./fop"/>
> 		<property name="allfiles.xml" value="fop-doc.xml"/>
> 		<property name="outfile.fo" value="fop.fo"/>
> 		<property name="outfile.pdf" value="fop.pdf"/>
> 		<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
> 		<taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- copies all xml files into one. the infile is a dummy, because the   -->
> 	<!-- source files are defined in the stylesheet                          -->
> 	<!-- =================================================================== -->
> 	<target name="prepare-files" depends="init">
> 		<xslt infile="fop.xml" xsltfile="xml2xml.xsl" outfile="${allfiles.xml}" smart="yes"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Generates the fo file                                               -->
> 	<!-- =================================================================== -->
> 	<target name="fo" depends="prepare-files">
> 		<xslt infile="${allfiles.xml}" xsltfile="xml2pdf.xsl" outfile="${outfile.fo}" smart="yes"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Generates the pdf file                                              -->
> 	<!-- =================================================================== -->
> 	<target name="pdf" depends="fo">
> 		<fop fofile="${outfile.fo}" outfile="${outfile.pdf}"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Clean targets                                                       -->
> 	<!-- =================================================================== -->
> 	<target name="clean">
> 		<delete file="${allfiles.xml}"/>
> 		<delete file="${outfile.fo}"/>
> 		<delete file="${outfile.pdf}"/>
> 	</target>
72d54
< 
Index: build.xml
===================================================================
RCS file: /home/cvspublic/xml-fop/docs/design/build.xml,v
retrieving revision 1.2
diff -r1.2 build.xml
2d1
< 
6d4
< 
8c6
<  	<target name="init">
---
> 	<target name="init">
12d9
< 	
14,49c11,37
< 
<       <taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/>
<       <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
<     </target>
<   
<   <!-- =================================================================== -->
<   <!-- Generate a help screen                                              -->
<   <!-- =================================================================== -->
<   <target name="help" depends="init">
<   	
<     <echo message="${name}-${version} build file, available targets:" />
<     <echo message="------------------------------------------------------------" />
<     <echo message="main            : Compile and prepare deployment directory. " />
<     <echo message="pdf             : Compile and prepare pdf user docs. "/>
<     <echo message="clean           : Clean deployment and distribution. " />
<     <echo message="------------------------------------------------------------" />
<     <echo message="	 USAGE: build &lt;target&gt; " />
<     
<   </target>
<   
<   <!-- =================================================================== -->
<   <!-- Prepares the build directory                                        -->
<   <!-- =================================================================== -->
<   <target name="prepare" depends="init">
<   </target>
<   
<   <!-- =================================================================== -->
<   <!-- Generates the pdf documentation                                     -->
<   <!-- =================================================================== -->
<   <target name="pdf" depends="prepare">
<     <echo message="Building pdf documentation. Please wait ..."/>
<     <delete file="fop.fo"/>
<     <xslt infile="fop.xml" xsltfile="docbook/fo/docbook.xsl"
<         dependent="fop.xml"
<         outfile="fop.fo" smart="yes"/>
< <!--
---
> 		<taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/>
> 		<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Generate a help screen                                              -->
> 	<!-- =================================================================== -->
> 	<target name="help" depends="init">
> 		<echo message="${name}-${version} build file, available targets:"/>
> 		<echo message="------------------------------------------------------------"/>
> 		<echo message="main            : Compile and prepare deployment directory. "/>
> 		<echo message="pdf             : Compile and prepare pdf user docs. "/>
> 		<echo message="clean           : Clean deployment and distribution. "/>
> 		<echo message="------------------------------------------------------------"/>
> 		<echo message="	 USAGE: build &lt;target&gt; "/>
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Prepares the build directory                                        -->
> 	<!-- =================================================================== -->
> 	<target name="prepare" depends="init"/>
> 	<!-- =================================================================== -->
> 	<!-- Generates the pdf documentation                                     -->
> 	<!-- =================================================================== -->
> 	<target name="pdf" depends="prepare">
> 		<echo message="Building pdf documentation. Please wait ..."/>
> 		<delete file="fop.fo"/>
> 		<xslt infile="fop.xml" xsltfile="docbook/fo/docbook.xsl" dependent="fop.xml" outfile="fop.fo" smart="yes"/>
> 		<!--
56,71c44,57
<     <fop fofile="fop.fo" pdffile="fop.pdf"/>
< <!--    <delete file="fop.fo"/>-->
<   </target>
< 
<   <!-- =================================================================== -->
<   <!-- Generates pdf and html documentation                                -->
<   <!-- =================================================================== -->
<   <target name="docs" depends="pdf"/>
< 
<   <!-- =================================================================== -->
<   <!-- Cleans up generated stuff                                           -->
<   <!-- =================================================================== -->
<   <target name="clean" depends="init">
<     <delete file="fop.fo"/>
<     <delete file="fop.pdf"/>
<   </target>
---
> 		<fop fofile="fop.fo" outfile="fop.pdf"/>
> 		<!--    <delete file="fop.fo"/>-->
> 	</target>
> 	<!-- =================================================================== -->
> 	<!-- Generates pdf and html documentation                                -->
> 	<!-- =================================================================== -->
> 	<target name="docs" depends="pdf"/>
> 	<!-- =================================================================== -->
> 	<!-- Cleans up generated stuff                                           -->
> 	<!-- =================================================================== -->
> 	<target name="clean" depends="init">
> 		<delete file="fop.fo"/>
> 		<delete file="fop.pdf"/>
> 	</target>
73d58
< 
