/[volute]/trunk/projects/grid/uws/doc/ivoadoc/build.xml
ViewVC logotype

Contents of /trunk/projects/grid/uws/doc/ivoadoc/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1459 - (show annotations)
Tue May 10 20:35:24 2011 UTC (9 years, 3 months ago) by harripa
File MIME type: text/xml
File size: 3727 byte(s)
example ant build file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- note it is intended that this file be used in a directory above this distribution directory -->
3 <project name="VOStandard" default="formatdoc">
4 <property name="filename" value="template"/> <!-- set this to the nickname of the document -->
5 <property name="docversion" value="1.0"/>
6 <property name="pubstatus" value="WD"/><!-- set to the status of the document WD, PR, REC, NOTE -->
7
8 <!-- the location of latex/bibtex binaries -->
9 <property name="latexlocation" location="/opt/local/bin"/>
10 <!-- the location of a binary FOP distribution -->
11 <property name="fop.home" value="/opt/packages/fop-1.0"/>
12
13 <!-- =================================
14 target: createdoc
15 ================================= -->
16 <target name="formatdoc" description="update TOC, numbering etc">
17 <tstamp></tstamp>
18 <copy file="${filename}.html" tofile="${filename}-old.html"/>
19 <xslt style="ivoadoc/ivoarestructure.xslt" in="${filename}-old.html" out="${filename}.html" force="true" >
20 <factory name="net.sf.saxon.TransformerFactoryImpl" />
21 <param name="docversion" expression="${docversion}"/>
22 <param name="pubstatus" expression="${pubstatus}"/>
23 <xmlcatalog>
24 <catalogpath><filelist><file name="./ivoadoc/xmlcatalog/catalog.xml"/></filelist></catalogpath>
25 </xmlcatalog>
26 </xslt>
27 </target>
28
29 <target name="createPDF">
30 <xslt style="ivoadoc/ivoa-fo.xsl" in="${filename}.html" out="out.fo" force="true">
31 <factory name="net.sf.saxon.TransformerFactoryImpl" />
32 <xmlcatalog>
33 <catalogpath><filelist><file name="./ivoadoc/xmlcatalog/catalog.xml"/></filelist></catalogpath>
34 </xmlcatalog>
35 </xslt>
36 <echo>applying fop</echo>
37 <fop format="application/pdf"
38 fofile="out.fo"
39 outfile="${filename}.pdf" messagelevel="DEBUG" />
40 </target>
41
42 <target name="regenerateRefs">
43 <xslt style="ivoadoc/extractcite.xslt" in="${filename}.html" out="${filename}.aux" force="true" >
44 <factory name="net.sf.saxon.TransformerFactoryImpl" />
45 <param name="target" expression="aux"/>
46 <xmlcatalog >
47 <catalogpath>
48 <filelist>
49 <file name="./ivoadoc/xmlcatalog/catalog.xml"/>
50 </filelist>
51 </catalogpath>
52 </xmlcatalog>
53 </xslt>
54 <exec executable="/opt/local/bin/bibtex">
55 <env key="PATH" path="${env.PATH}:${latexlocation}"/>
56 <arg value="${filename}" />
57 </exec>
58 <echo>Now edit the references into the document from ${filename}.bbl</echo>
59 </target>
60
61 <!-- =================================
62 target: package
63 ================================= -->
64 <target name="package" description="create a zip file of document and associated files for upload to IVOA site">
65 <tstamp></tstamp>
66 <copy file="${filename}.html" tofile="${pubstatus}-${filename}-${docversion}-${DSTAMP}.html"></copy>
67 <copy file="${filename}.pdf" tofile="${pubstatus}-${filename}-${docversion}-${DSTAMP}.pdf"></copy>
68
69 <zip destfile="${filename}.zip" basedir="${basedir}" includes="${pubstatus}-${filename}-${docversion}-${DSTAMP}.html, ${pubstatus}-${filename}-${docversion}-${DSTAMP}.pdf, **/*.css,**/*.png,**/*.gif">
70
71 </zip>
72 </target>
73
74
75 <taskdef name="fop"
76 classname="org.apache.fop.tools.anttasks.Fop">
77 <classpath>
78 <fileset dir="${fop.home}/lib">
79 <include name="*.jar"/>
80 </fileset>
81 <fileset dir="${fop.home}/build">
82 <include name="fop.jar"/>
83 </fileset>
84 </classpath>
85 </taskdef>
86 </project>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26