-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_dita2javahelp.xml
224 lines (207 loc) · 9.59 KB
/
build_dita2javahelp.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Open Toolkit project.
Copyright 2006 IBM Corporation
See the accompanying LICENSE file for applicable license.
-->
<project name="dita2javahelp">
<target name="dita2javahelp.init">
<property name="html-version" value="html"/>
</target>
<target name="dita2javahelp"
unless="noMap"
depends="dita2javahelp.init, build-init, preprocess,
xhtml.topics,
copy-css">
<antcall target="dita.map.javahelp"/>
<antcall target="compile.Java.Help"/>
</target>
<target name="dita.map.javahelp"
depends="dita.map.javahelp.init,
dita.map.javahelp.toc, dita.map.javahelp.map,
dita.map.javahelp.set, dita.map.javahelp.index">
</target>
<target name="dita.map.javahelp.init"
description="Init properties for JavaHelp">
<condition property="args.javahelp.toc" value="${dita.map.filename.root}">
<not>
<isset property="args.javahelp.toc" />
</not>
</condition>
<condition property="out.ext" value=".html">
<not>
<isset property="out.ext" />
</not>
</condition>
<condition property="args.javahelp.map" value="${dita.map.filename.root}">
<not>
<isset property="args.javahelp.map" />
</not>
</condition>
</target>
<target name="dita.map.javahelp.toc"
depends="dita.map.javahelp.init"
description="Build JavaHelp TOC file">
<local name="javahelp.toc.output.dir"/>
<condition property="javahelp.toc.output.dir" value="${dita.output.dir}" else="${_dita.map.output.dir}">
<isset property="inner.transform"/>
</condition>
<xslt
basedir="${dita.temp.dir}"
destdir="${javahelp.toc.output.dir}"
includesfile="${dita.temp.dir}/${user.input.file.listfile}"
classpathref="dost.class.path"
style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelptoc.xsl">
<excludesfile name="${dita.temp.dir}/${resourceonlyfile}" if="resourceonlyfile"/>
<param name="OUTEXT" expression="${out.ext}" if="out.ext" />
<mergemapper to="${args.javahelp.toc}.xml"/>
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<!-- Deprecated since 2.1 -->
<target name="dita.out.map.javahelp.toc"
depends="dita.map.javahelp.init" if="inner.transform"
description="Build JavaHelp TOC file">
<xslt
basedir="${dita.temp.dir}"
destdir="${dita.output.dir}"
includesfile="${dita.temp.dir}/${user.input.file.listfile}"
classpathref="dost.class.path"
style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelptoc.xsl">
<excludesfile name="${dita.temp.dir}/${resourceonlyfile}" if="resourceonlyfile"/>
<param name="OUTEXT" expression="${out.ext}" if="out.ext" />
<mapper type="glob"
from="${user.input.file}"
to="${args.javahelp.toc}.xml" />
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<target name="dita.map.javahelp.map"
depends="dita.map.javahelp.init"
description="Build JavaHelp Map file">
<local name="javahelp.map.output.dir"/>
<condition property="javahelp.map.output.dir" value="${dita.output.dir}" else="${_dita.map.output.dir}">
<isset property="inner.transform"/>
</condition>
<xslt
basedir="${dita.temp.dir}"
destdir="${javahelp.map.output.dir}"
includesfile="${dita.temp.dir}/${user.input.file.listfile}"
classpathref="dost.class.path"
style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpmap.xsl">
<excludesfile name="${dita.temp.dir}/${resourceonlyfile}" if="resourceonlyfile"/>
<param name="OUTEXT" expression="${out.ext}" if="out.ext" />
<mergemapper to="${args.javahelp.map}.jhm"/>
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<!-- Deprecated since 2.1 -->
<target name="dita.out.map.javahelp.map"
depends="dita.map.javahelp.init" if="inner.transform"
description="Build JavaHelp Map file">
<xslt
basedir="${dita.temp.dir}"
destdir="${dita.output.dir}"
includesfile="${dita.temp.dir}/${user.input.file.listfile}"
classpathref="dost.class.path"
style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpmap.xsl">
<excludesfile name="${dita.temp.dir}/${resourceonlyfile}" if="resourceonlyfile"/>
<param name="OUTEXT" expression="${out.ext}" if="out.ext" />
<mapper type="glob"
from="${user.input.file}"
to="${args.javahelp.map}.jhm" />
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<target name="dita.map.javahelp.set"
depends="dita.map.javahelp.init, dita.map.javahelp.map"
description="Build JavaHelp Set file">
<local name="javahelp.set.output.dir"/>
<condition property="javahelp.set.output.dir" value="${dita.output.dir}" else="${_dita.map.output.dir}">
<isset property="inner.transform"/>
</condition>
<xslt
basedir="${dita.temp.dir}"
destdir="${javahelp.set.output.dir}"
includesfile="${dita.temp.dir}/${user.input.file.listfile}"
classpathref="dost.class.path"
style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpset.xsl">
<excludesfile name="${dita.temp.dir}/${resourceonlyfile}" if="resourceonlyfile"/>
<param name="javahelpmap" expression="${args.javahelp.map}" />
<param name="javahelptoc" expression="${args.javahelp.toc}" />
<param name="basedir" expression="${basedir}"/>
<param name="outputdir" expression="${dita.output.dir}"/>
<mergemapper to="${dita.map.filename.root}_helpset.hs"/>
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<!-- Deprecated since 2.1 -->
<target name="dita.out.map.javahelp.set"
depends="dita.map.javahelp.init, dita.out.map.javahelp.map" if="inner.transform"
description="Build JavaHelp Set file">
<xslt
basedir="${dita.temp.dir}"
destdir="${dita.output.dir}"
includesfile="${dita.temp.dir}/${user.input.file.listfile}"
classpathref="dost.class.path"
style="${dita.plugin.org.dita.javahelp.dir}/xsl/map2javahelpset.xsl">
<excludesfile name="${dita.temp.dir}/${resourceonlyfile}" if="resourceonlyfile"/>
<param name="javahelpmap" expression="${args.javahelp.map}" />
<param name="javahelptoc" expression="${args.javahelp.toc}" />
<param name="basedir" expression="${basedir}"/>
<param name="outputdir" expression="${dita.output.dir}"/>
<mapper type="glob"
from="${user.input.file}"
to="${dita.map.filename.root}_helpset.hs" />
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<target name="dita.map.javahelp.index"
description="Build JavaHelp Index file">
<local name="javahelp.index.output.dir"/>
<condition property="javahelp.index.output.dir" value="${dita.output.dir}" else="${_dita.map.output.dir}">
<isset property="inner.transform"/>
</condition>
<pipeline message="Extract index term."
tempdir="${dita.temp.dir}"
inputmap="${user.input.file}">
<module class="org.dita.dost.module.IndexTermExtractModule">
<param name="output" location="${javahelp.index.output.dir}/${dita.map.filename.root}.xml"/>
<param name="targetext" value=".html"/>
<param name="indextype" value="javahelp"/>
<param name="encoding" value="${args.dita.locale}" if="args.dita.locale"/>
</module>
</pipeline>
</target>
<!-- Deprecated since 2.1 -->
<target name="dita.out.map.javahelp.index" if="inner.transform"
description="Build JavaHelp Index file">
<pipeline message="Extract index term."
tempdir="${dita.temp.dir}"
inputmap="${user.input.file}">
<module class="org.dita.dost.module.IndexTermExtractModule">
<param name="output" location="${dita.output.dir}/${dita.map.filename.root}.xml"/>
<param name="targetext" value=".html"/>
<param name="indextype" value="javahelp"/>
<param name="encoding" value="${args.dita.locale}" if="args.dita.locale"/>
</module>
</pipeline>
</target>
<target name="compile.Java.Help"
if="env.JHHOME"
description="Compile Java Help output">
<!-- delete 'JavaHelpSearch' directory before compiling. -->
<condition property="compile.dir" value="${dita.map.output.dir}">
<isset property="old.transform"/>
</condition>
<condition property="compile.dir" value="${dita.output.dir}">
<isset property="inner.transform"/>
</condition>
<delete dir="${compile.dir}/JavaHelpSearch" />
<java jar="${env.JHHOME}${file.separator}javahelp${file.separator}bin${file.separator}jhindexer.jar"
fork="true"
dir="${compile.dir}">
<arg value="." />
</java>
</target>
</project>