You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0"?>
  2. <!-- ===========================================================================
  3. Build targets
  4. =============
  5. These are the meaningful targets for this build file:
  6. - pdf [default] -> creates ./fop.pdf
  7. - clean -> deletes all files produced by this script
  8. -->
  9. <project default="pdf" basedir=".">
  10. <!-- =================================================================== -->
  11. <!-- Initialization target -->
  12. <!-- =================================================================== -->
  13. <target name="init">
  14. <tstamp/>
  15. <property name="src.dir" value="./fop"/>
  16. <property name="allfiles.xml" value="fop-doc.xml"/>
  17. <property name="outfile.fo" value="fop.fo"/>
  18. <property name="outfile.pdf" value="fop.pdf"/>
  19. <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"/>
  20. <taskdef name="xslt" classname="org.apache.fop.tools.anttasks.Xslt"/>
  21. </target>
  22. <!-- =================================================================== -->
  23. <!-- copies all xml files into one. the infile is a dummy, because the -->
  24. <!-- source files are defined in the stylesheet -->
  25. <!-- =================================================================== -->
  26. <target name="prepare-files" depends="init">
  27. <xslt infile="fop.xml" xsltfile="xml2xml.xsl"
  28. outfile="${allfiles.xml}" smart="yes"/>
  29. </target>
  30. <!-- =================================================================== -->
  31. <!-- Generates the fo file -->
  32. <!-- =================================================================== -->
  33. <target name="fo" depends="prepare-files">
  34. <xslt infile="${allfiles.xml}" xsltfile="xml2pdf.xsl"
  35. outfile="${outfile.fo}" smart="yes"/>
  36. </target>
  37. <!-- =================================================================== -->
  38. <!-- Generates the pdf file -->
  39. <!-- =================================================================== -->
  40. <target name="pdf" depends="fo">
  41. <fop fofile="${outfile.fo}" pdffile="${outfile.pdf}"/>
  42. </target>
  43. <!-- =================================================================== -->
  44. <!-- Clean targets -->
  45. <!-- =================================================================== -->
  46. <target name="clean">
  47. <delete file="${allfiles.xml}"/>
  48. <delete file="${outfile.fo}"/>
  49. <delete file="${outfile.pdf}"/>
  50. </target>
  51. </project>
  52. <!-- End of file -->