| 1 |
<project name="DocBook conversions" default="all"> |
| 2 |
|
| 3 |
<target name="init"> |
| 4 |
|
| 5 |
<property name="docbook.base" value="../xsl/docbook-base" /> |
| 6 |
<property name="fop.base" value="/usr/local/apps/fop" /> |
| 7 |
<property name="xxe.base" value="/usr/local/apps/xxe-pro/current" /> |
| 8 |
|
| 9 |
<property name="xalan.dir" value="${docbook.base}/xalan/current" /> |
| 10 |
<property name="fop.dir" value="${fop.base}/current" /> |
| 11 |
<property name="docbook.dtd.dir" value="${docbook.base}/dtd/" /> |
| 12 |
<property name="docbook.xsl.dir" value="${docbook.base}/docbook-xsl" /> |
| 13 |
<property name="docbook.xsl.ecmwf.dir" value="${docbook.base}/docbook-xsl-ecmwf" /> |
| 14 |
|
| 15 |
<property name="out.dir.html" value="${out.dir}" /> |
| 16 |
<property name="out.fo" value="${presentation.dir}/fo/project.fo" /> |
| 17 |
|
| 18 |
<!-- |
| 19 |
<property name="html.xsl" value="${docbook.xsl.ecmwf.dir}/w3ec2_html.xsl" /> |
| 20 |
<property name="html.xsl.big" value="${docbook.xsl.ecmwf.dir}/docbook.xsl" /> |
| 21 |
<property name="fo.xsl" value="${docbook.xsl.ecmwf.dir}/ems.xsl" /> |
| 22 |
--> |
| 23 |
|
| 24 |
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"> |
| 25 |
<classpath> |
| 26 |
<pathelement location="${fop.dir}/build/fop.jar"/> |
| 27 |
<pathelement location="${fop.dir}/lib/avalon-framework-cvs-20020806.jar"/> |
| 28 |
<pathelement location="${fop.dir}/lib/batik.jar"/> |
| 29 |
<pathelement location="${fop.dir}/lib/JimiProClasses.zip"/> |
| 30 |
</classpath> |
| 31 |
</taskdef> |
| 32 |
|
| 33 |
<xmlcatalog id="theCatalog"> |
| 34 |
<!-- |
| 35 |
(C) Copyright 1996-2016 ECMWF. |
| 36 |
|
| 37 |
This software is licensed under the terms of the Apache Licence Version 2.0 |
| 38 |
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. |
| 39 |
In applying this licence, ECMWF does not waive the privileges and immunities |
| 40 |
granted to it by virtue of its status as an intergovernmental organisation nor |
| 41 |
does it submit to any jurisdiction. |
| 42 |
--> |
| 43 |
|
| 44 |
<dtd publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" location="${docbook.dtd.dir}/dbk40/docbookx.dtd"/> |
| 45 |
<dtd publicId="-//OASIS//DTD DocBook XML V4.2//EN" location="${docbook.dtd.dir}/dbk42/docbookx.dtd"/> |
| 46 |
<dtd publicId="-//OASIS//DTD DocBook XML V4.3//EN" location="${docbook.dtd.dir}/dbk43/docbookx.dtd"/> |
| 47 |
<dtd publicId="-//ECMWF//DTD Memo XML V1.0//EN" location="${docbook.dtd.dir}/memo/V1.0/memo.dtd" /> |
| 48 |
<dtd publicId="-//OASIS//DTD Simplified DocBook XML V1.0//EN" location="${xxe.base}/config/sdocbook/dtd/V1.0/sdocbook.dtd" /> |
| 49 |
</xmlcatalog> |
| 50 |
|
| 51 |
<path id="xslt.classpath"> |
| 52 |
<pathelement location="${xalan.dir}/xalan.jar"/> |
| 53 |
<pathelement location="${xalan.dir}/xercesImpl.jar"/> |
| 54 |
<pathelement location="${docbook.xsl.dir}/current/extensions/xalan2.jar"/> |
| 55 |
</path> |
| 56 |
|
| 57 |
<path id="xslt.classpath.saxon"> |
| 58 |
<pathelement location="${xxe.dir}/saxon.jar"/> |
| 59 |
<pathelement location="${docbook.xsl.dir}/current/extensions/saxon651.jar"/> |
| 60 |
</path> |
| 61 |
|
| 62 |
</target> |
| 63 |
|
| 64 |
<target name="all" depends="html, pdf"> |
| 65 |
</target> |
| 66 |
|
| 67 |
|
| 68 |
<!-- xml.docbook, out.dir.html, xsl.html --> |
| 69 |
<target name="html" depends="init"> |
| 70 |
<xslt in="${docbook.xml}" out="${out.dir.html}/index.html" style="${out.xsl}"> |
| 71 |
|
| 72 |
<param name="ecmwf.location" expression="${ecmwf.location}"/> |
| 73 |
<param name="ecmwf.submenu" expression="${ecmwf.submenu}"/> |
| 74 |
<param name="target.database.document" expression="${target.database.document}"/> |
| 75 |
<param name="current.docid" expression="${current.docid}"/> |
| 76 |
<param name="collect.xref.targets" expression="${collect.xref.targets}"/> |
| 77 |
<param name="targets.filename" expression="${targets.filename}"/> |
| 78 |
|
| 79 |
<classpath refid="xslt.classpath" /> |
| 80 |
<xmlcatalog refid="theCatalog"/> |
| 81 |
|
| 82 |
</xslt> |
| 83 |
</target> |
| 84 |
|
| 85 |
<target name="xml" depends="init"> |
| 86 |
<xslt in="${docbook.xml}" out="${file.noExtension}.xml.out" style="${out.xsl}"> |
| 87 |
<classpath refid="xslt.classpath" /> |
| 88 |
<xmlcatalog refid="theCatalog"/> |
| 89 |
</xslt> |
| 90 |
</target> |
| 91 |
|
| 92 |
<!-- docbook.xml, out.html, xsl.html --> |
| 93 |
<target name="fo" depends="init"> |
| 94 |
<xslt in="${docbook.xml}" out="${out.fo}" style="${out.xsl}"> |
| 95 |
<param name="target.database.document" expression="${target.database.document}"/> |
| 96 |
<param name="current.docid" expression="${current.docid}"/> |
| 97 |
<param name="collect.xref.targets" expression="${collect.xref.targets}"/> |
| 98 |
<param name="targets.filename" expression="${targets.filename}"/> |
| 99 |
|
| 100 |
<classpath refid="xslt.classpath" /> |
| 101 |
<xmlcatalog refid="theCatalog"/> |
| 102 |
|
| 103 |
|
| 104 |
</xslt> |
| 105 |
|
| 106 |
<echo>Hello</echo> |
| 107 |
</target> |
| 108 |
|
| 109 |
|
| 110 |
<target name="pdf" depends="fo"> |
| 111 |
<fop format="application/pdf" fofile="${out.fo}" outfile="${out.pdf}" messagelevel="error"> |
| 112 |
</fop> |
| 113 |
</target> |
| 114 |
|
| 115 |
<target name="ps" depends="fo"> |
| 116 |
<fop format="application/postscript" fofile="${out.fo}" outfile="${out.ps}" messagelevel="error"> |
| 117 |
</fop> |
| 118 |
</target> |
| 119 |
|
| 120 |
<target name="rtf" depends="fo"> |
| 121 |
<fop format="application/rtf" fofile="${out.fo}" outfile="${out.rtf}" /> |
| 122 |
</target> |
| 123 |
|
| 124 |
|
| 125 |
</project> |