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