Improving desktop template
[geeqie.git] / doc / wiki2docbook / html2db / build.xml
1 <!-- This build file won't work on your machine.  It uses too many\r
2 absolute pathnames.  I'm including it in case it's useful to you\r
3 as a starting point -->\r
4 <project default="build">\r
5   <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>\r
6   <property file="build.properties"/>\r
7   \r
8   <path id="saxon.processor.classpath">\r
9     <pathelement path="${saxon.location}" />\r
10     <pathelement path="${xercesImpl.dir}/xercesImpl.jar"/>\r
11     <pathelement path="${docbook-xsl}/extensions/saxon651.jar" />\r
12   </path>\r
13   \r
14   <path id="classpath.fop">\r
15     <pathelement path="${fop.dir}/fop.jar"/>\r
16     <pathelement path="${xerces.dir}/xerces.jar"/>\r
17     <pathelement path="${fop.dir}/batik.jar"/>\r
18     <pathelement path="${fop.dir}/avalon-framework-cvs-20020806.jar"/>\r
19   </path>\r
20   \r
21   <xmlcatalog id="commonDTDs">\r
22     <dtd publicId="-//W3C//DTD XHTML 1.0 Transitional//EN"\r
23          location="${dtds}/xhtml1-transitional.dtd"/>\r
24   </xmlcatalog>\r
25   \r
26   <target name="db">\r
27     <!-- The output depends on these, but the style task doesn't know this,\r
28          so delete them manually -->\r
29     <outofdate>\r
30       <sourcefiles>\r
31         <fileset dir="." includes="html2db.xsl,html2db-common.xsl,html2db-utils.xsl"/>\r
32       </sourcefiles>\r
33       <targetfiles path="index.xml"/>\r
34       <sequential>\r
35         <delete file="index.xml"/>\r
36       </sequential>\r
37     </outofdate>\r
38     <style style="example.xsl"\r
39            in="index.src.html"\r
40            out="index.xml">\r
41       <xmlcatalog refid="commonDTDs"/>\r
42     </style>\r
43   </target>\r
44   \r
45   <target name="saxon">\r
46     <java classname="com.icl.saxon.StyleSheet"\r
47           fork="yes" \r
48           failonerror="true">\r
49       <classpath refid="saxon.processor.classpath" />\r
50       <!--jvmarg value="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>\r
51       <jvmarg value="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>\r
52       <jvmarg value="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/-->\r
53       <arg line="-o index.xml"/>\r
54       <arg line="index.src.html"/>\r
55       <arg line="example.xsl"/>\r
56     </java>\r
57   </target>\r
58   \r
59   <target name="just-html">\r
60     <style style="${docbook}/html/docbook.xsl"\r
61            in="index.xml"\r
62            out="index.html">\r
63       <param name="shade.verbatim" expression="1"/>  \r
64       <param name="make.valid.html" expression="1"/>\r
65     </style>\r
66   </target>\r
67   \r
68   <target name="html" depends="db,just-html"/>\r
69   \r
70   <target name="chunk" depends="db">\r
71     <mkdir dir="docs"/>\r
72     <style style="${docbook}/html/chunk.xsl"\r
73            in="index.xml"\r
74            out="docs/index.html">\r
75       <param name="shade.verbatim" expression="1"/>  \r
76     </style>\r
77   </target>\r
78   \r
79   <target name="pdf" depends="db">\r
80     <style style="${docbook}/fo/docbook.xsl"\r
81            in="index.xml"\r
82            out="index.fo">\r
83       <param name="shade.verbatim" expression="1"/>  \r
84       <param name="fop.extensions" expression="1"/>\r
85     </style>\r
86     <outofdate>\r
87       <sourcefiles>\r
88         <fileset dir="." includes="index.fo"/>\r
89       </sourcefiles>\r
90       <targetfiles>\r
91         <fileset dir="." includes="html2db.pdf"/>\r
92       </targetfiles>\r
93       <sequential>\r
94         <java classname="org.apache.fop.apps.Fop"\r
95               fork="yes"\r
96               failonerror="true">\r
97           <classpath refid="classpath.fop"/>\r
98           <arg line="-fo index.fo"/>\r
99           <arg line="-pdf html2db.pdf"/>\r
100         </java>\r
101       </sequential>\r
102     </outofdate>\r
103   </target>\r
104   \r
105   <target name="docs" depends="html,chunk,pdf"/>\r
106   \r
107   <target name="zip" depends="docs">\r
108     <zip destfile="build/html2db.zip">\r
109       <!-- html2db source -->\r
110       <fileset dir="." includes="*.xsl,index.src.html"/>\r
111       <fileset dir="." includes="*.xsl,index.src.html,LICENSE.txt"/>\r
112       <!-- build source -->\r
113       <fileset dir="." includes="build.xml,tidy.properties"/>\r
114       <!-- generated docs -->\r
115       <fileset dir="." includes="index.xml,index.html,html2db.pdf"/>\r
116       <fileset dir="docs"/>\r
117     </zip>\r
118   </target>\r
119   \r
120   <target name="build" depends="zip"/>\r
121   \r
122   <target name="sitedocs" depends="chunk">\r
123     <exec executable="tidy">\r
124       <arg line="-config tidy.properties -o build/index.html docs/index.html"/>\r
125     </exec>\r
126     <mkdir dir="build/sitedocs"/>\r
127     <style style="extract-toc.xsl"\r
128            in="build/index.html"\r
129            out="build/sitedocs/index.html">\r
130       <xmlcatalog refid="commonDTDs"/>\r
131     </style>\r
132     <copy todir="build/sitedocs">\r
133       <fileset dir="docs" includes="*" excludes="index.html"/>\r
134     </copy>\r
135   </target>\r
136   \r
137   <target name="stage" depends="zip,sitedocs">\r
138     <property file="build.properties"/>\r
139     <echo message="${docbook}"/>\r
140     <echo message="${htdocs}"/>\r
141     <copy file="build/html2db.zip" todir="${htdocs}/sources"/>\r
142     <copy todir="${htdocs}/software/xslt/html2db">\r
143       <fileset dir="." includes="*.xsl,index.src.html,build.xml"/>\r
144       <fileset dir="." includes="index.xml,html2db.pdf"/>\r
145       <fileset dir="build/sitedocs"/>\r
146     </copy>\r
147     <copy tofile="${htdocs}/software/xslt/html2db/onepage.html"\r
148           file="index.html"/>\r
149   </target>\r
150   \r
151   <target name="clean">\r
152     <delete>\r
153       <fileset dir="." includes="index.fo"/>\r
154       <fileset dir="." includes="index.xml,index.html,index.fo,html2db.pdf"/>\r
155       <fileset dir="build"/>\r
156       <fileset dir="docs"/>\r
157     </delete>\r
158   </target>\r
159   \r
160 </project>\r