1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!--
|
---|
3 | Copyright © 2005 by Idiom Technologies, Inc. All rights reserved.
|
---|
4 | IDIOM is a registered trademark of Idiom Technologies, Inc. and WORLDSERVER
|
---|
5 | and WORLDSTART are trademarks of Idiom Technologies, Inc. All other
|
---|
6 | trademarks are the property of their respective owners.
|
---|
7 |
|
---|
8 | IDIOM TECHNOLOGIES, INC. IS DELIVERING THE SOFTWARE "AS IS," WITH
|
---|
9 | ABSOLUTELY NO WARRANTIES WHATSOEVER, WHETHER EXPRESS OR IMPLIED, AND IDIOM
|
---|
10 | TECHNOLOGIES, INC. DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
---|
11 | BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
---|
12 | PURPOSE AND WARRANTY OF NON-INFRINGEMENT. IDIOM TECHNOLOGIES, INC. SHALL NOT
|
---|
13 | BE LIABLE FOR INDIRECT, INCIDENTAL, SPECIAL, COVER, PUNITIVE, EXEMPLARY,
|
---|
14 | RELIANCE, OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO LOSS OF
|
---|
15 | ANTICIPATED PROFIT), ARISING FROM ANY CAUSE UNDER OR RELATED TO OR ARISING
|
---|
16 | OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF IDIOM
|
---|
17 | TECHNOLOGIES, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
---|
18 |
|
---|
19 | Idiom Technologies, Inc. and its licensors shall not be liable for any
|
---|
20 | damages suffered by any person as a result of using and/or modifying the
|
---|
21 | Software or its derivatives. In no event shall Idiom Technologies, Inc.'s
|
---|
22 | liability for any damages hereunder exceed the amounts received by Idiom
|
---|
23 | Technologies, Inc. as a result of this transaction.
|
---|
24 |
|
---|
25 | These terms and conditions supersede the terms and conditions in any
|
---|
26 | licensing agreement to the extent that such terms and conditions conflict
|
---|
27 | with those set forth herein.
|
---|
28 | -->
|
---|
29 | <project xmlns:dita="http://dita-ot.sourceforge.net" name="dita.build" basedir=".">
|
---|
30 |
|
---|
31 | <import file="${dita.plugin.org.dita.pdf2.dir}/build_fop.xml"/>
|
---|
32 | <import file="${dita.plugin.org.dita.pdf2.dir}/build_axf.xml"/>
|
---|
33 | <import file="${dita.plugin.org.dita.pdf2.dir}/build_xep.xml"/>
|
---|
34 |
|
---|
35 | <target name="dita2pdf2.init">
|
---|
36 | <dita-ot-fail id="DOTA066F">
|
---|
37 | <condition>
|
---|
38 | <and>
|
---|
39 | <isset property="args.xsl.pdf" />
|
---|
40 | <not>
|
---|
41 | <available file="${args.xsl.pdf}" type="file" />
|
---|
42 | </not>
|
---|
43 | </and>
|
---|
44 | </condition>
|
---|
45 | <param name="1" location="${args.xsl.pdf}"/>
|
---|
46 | </dita-ot-fail>
|
---|
47 |
|
---|
48 | <condition property="preprocess.copy-image.skip" value="true">
|
---|
49 | <isfalse value="${org.dita.pdf2.use-out-temp}"/>
|
---|
50 | </condition>
|
---|
51 | <condition property="retain.topic.fo" value="true">
|
---|
52 | <isfalse value="${org.dita.pdf2.use-out-temp}"/>
|
---|
53 | </condition>
|
---|
54 | <!-- Legacy: pass empty input directory -->
|
---|
55 | <condition property="user.input.dir.url" value="">
|
---|
56 | <istrue value="${org.dita.pdf2.use-out-temp}"/>
|
---|
57 | </condition>
|
---|
58 |
|
---|
59 | <condition property="args.rellinks" value="none">
|
---|
60 | <not><isset property="args.rellinks"/></not>
|
---|
61 | </condition>
|
---|
62 | </target>
|
---|
63 |
|
---|
64 | <target name="dita2pdf2" depends="dita2pdf2.init, build-init, preprocess, map2pdf2, topic2pdf2"/>
|
---|
65 |
|
---|
66 | <target name="transform.topic2pdf.init">
|
---|
67 | <condition property="pdf2.temp.dir" value="${dita.temp.dir}" else="${dita.map.output.dir}">
|
---|
68 | <isfalse value="${org.dita.pdf2.use-out-temp}"/>
|
---|
69 | </condition>
|
---|
70 |
|
---|
71 | <property name="customization.dir" value="${dita.plugin.org.dita.pdf2.dir}/Customization"/>
|
---|
72 | <property file="${customization.dir}/build.properties"/>
|
---|
73 |
|
---|
74 | <condition property="pdf2.i18n.skip" value="true">
|
---|
75 | <and>
|
---|
76 | <isset property="org.dita.pdf2.i18n.enabled"/>
|
---|
77 | <isfalse value="${org.dita.pdf2.i18n.enabled}"/>
|
---|
78 | </and>
|
---|
79 | </condition>
|
---|
80 |
|
---|
81 | <loadfile property="default.locale">
|
---|
82 | <string>${default.language}</string>
|
---|
83 | <filterchain>
|
---|
84 | <tokenfilter>
|
---|
85 | <replaceregex pattern="-" replace="_" flags="gi"/>
|
---|
86 | </tokenfilter>
|
---|
87 | </filterchain>
|
---|
88 | </loadfile>
|
---|
89 |
|
---|
90 | <property name="lib.dir" value="${dita.dir}/lib"/>
|
---|
91 | <property name="fo.lib.dir" value="${dita.plugin.org.dita.pdf2.dir}/lib"/>
|
---|
92 | <property name="merged.file" value="${dita.map.filename.root}_MERGED.xml"/>
|
---|
93 |
|
---|
94 | <!-- configure FO engines -->
|
---|
95 | <!-- default is FOP. Can be changed here, or with pdf.formatter property. -->
|
---|
96 | <property name="pdf.formatter" value="fop"/>
|
---|
97 |
|
---|
98 | <property name="artwork.dir" value="${pdf2.temp.dir}"/>
|
---|
99 |
|
---|
100 | <condition property="file.protocol.prefix" value="file://">
|
---|
101 | <os family="unix"/>
|
---|
102 | </condition>
|
---|
103 |
|
---|
104 | <condition property="file.protocol.prefix" value="file:/">
|
---|
105 | <not><isset property="file.protocol.prefix"/></not>
|
---|
106 | </condition>
|
---|
107 |
|
---|
108 | <property name="xml.catalog.files" value="${customization.dir}/catalog.xml;${dita.plugin.org.dita.pdf2.dir}/cfg/catalog.xml;${dita.dir}/catalog-dita.xml"/>
|
---|
109 |
|
---|
110 | <property name="xsl.dir" value="${dita.plugin.org.dita.pdf2.dir}/xsl"/>
|
---|
111 | <property name="xsl.fo.dir" value="${dita.plugin.org.dita.pdf2.dir}/xsl/fo"/>
|
---|
112 | <property name="xsl.common.dir" value="${dita.plugin.org.dita.pdf2.dir}/xsl/common"/>
|
---|
113 | <property name="cfg.dir" value="${dita.plugin.org.dita.pdf2.dir}/cfg"/>
|
---|
114 | <property name="cfg.fo.dir" value="${dita.plugin.org.dita.pdf2.dir}/cfg/fo"/>
|
---|
115 | <property name="cfg.common.dir" value="${dita.plugin.org.dita.pdf2.dir}/cfg/common"/>
|
---|
116 |
|
---|
117 | <path id="project.class.path">
|
---|
118 | <pathelement path="${java.class.path}"/>
|
---|
119 | <fileset dir="${lib.dir}/saxon">
|
---|
120 | <include name="**/*.jar"/>
|
---|
121 | </fileset>
|
---|
122 | <!--
|
---|
123 | <pathelement location="${lib.dir}/xml-apis.jar"/>
|
---|
124 | <pathelement location="${lib.dir}/xercesImpl.jar"/>
|
---|
125 | -->
|
---|
126 | <pathelement location="${lib.dir}/resolver.jar"/>
|
---|
127 | <pathelement location="${lib.dir}/icu4j.jar"/>
|
---|
128 | <pathelement location="${fo.lib.dir}/fo.jar"/>
|
---|
129 | </path>
|
---|
130 | </target>
|
---|
131 |
|
---|
132 | <target name="topic2pdf2" if="noMap">
|
---|
133 | <antcall target="preview.topic.pdf"/>
|
---|
134 | </target>
|
---|
135 |
|
---|
136 | <target name="preview.topic.pdf"
|
---|
137 | depends="transform.topic2pdf.init,
|
---|
138 | preview.topic.pdf.init,
|
---|
139 | transform.topic2pdf"/>
|
---|
140 | <target name="preview.topic.pdf.init">
|
---|
141 | <property name="inputFile" location="${dita.temp.dir}/${user.input.file}"/>
|
---|
142 | <!--property name="outputFile" location="${dita.map.output.dir}/${dita.topic.filename.root}.pdf"/-->
|
---|
143 | <property name="outputFile.base" value="${dita.topic.filename.root}"/>
|
---|
144 | <property name="artworkPrefix" value="${artwork.dir}"/>
|
---|
145 | </target>
|
---|
146 |
|
---|
147 | <target name="map2pdf2" unless="noMap">
|
---|
148 | <dirname property="dita.temp.dir.fullpath" file="${dita.temp.dir}${file.separator}dummy.file"/>
|
---|
149 | <pipeline message="topicmerge"
|
---|
150 | inputmap="${dita.temp.dir.fullpath}${file.separator}${user.input.file}"
|
---|
151 | tempdir="${dita.temp.dir.fullpath}">
|
---|
152 | <module class="org.dita.dost.module.TopicMergeModule">
|
---|
153 | <param name="output" location="${dita.temp.dir.fullpath}${file.separator}${dita.map.filename.root}_MERGED.xml"/>
|
---|
154 | <param name="style" location="${dita.plugin.org.dita.pdf2.dir}/xsl/common/topicmerge.xsl"/>
|
---|
155 | </module>
|
---|
156 | </pipeline>
|
---|
157 | <antcall target="publish.map.pdf"/>
|
---|
158 | </target>
|
---|
159 |
|
---|
160 | <target name="publish.map.pdf"
|
---|
161 | depends="transform.topic2pdf.init,
|
---|
162 | publish.map.pdf.init,
|
---|
163 | transform.topic2pdf"/>
|
---|
164 | <target name="publish.map.pdf.init">
|
---|
165 | <property name="inputFile" location="${dita.temp.dir}/${merged.file}"/>
|
---|
166 | <!--property name="outputFile" location="${dita.map.output.dir}/${dita.map.filename.root}.pdf"/-->
|
---|
167 | <property name="outputFile.base" value="${dita.map.filename.root}"/>
|
---|
168 | <property name="artworkPrefix" value="${artwork.dir}"/>
|
---|
169 | </target>
|
---|
170 |
|
---|
171 | <target name="transform.topic2fo"
|
---|
172 | depends="transform.topic2fo.init,
|
---|
173 | transform.topic2fo.index,
|
---|
174 | transform.topic2fo.flagging,
|
---|
175 | transform.topic2fo.main,
|
---|
176 | transform.topic2fo.i18n"/>
|
---|
177 |
|
---|
178 | <target name="transform.topic2fo.init">
|
---|
179 | <taskdef name="detect-lang" classname="com.suite.sol.ditaot.DetectLang"
|
---|
180 | classpathref="project.class.path"/>
|
---|
181 | <taskdef name="gen-variable" classname="org.dita.dost.pdf2.VariableFileTask"
|
---|
182 | classpathref="project.class.path"/>
|
---|
183 |
|
---|
184 | <makeurl file="${inputFile}" property="inputFile.url" validate="true"/>
|
---|
185 |
|
---|
186 | <!-- Set document.locale from xml:lang -->
|
---|
187 | <!-- The map takes precedence, followed by the first topic -->
|
---|
188 | <detect-lang documentPath="${inputFile.url}"/>
|
---|
189 |
|
---|
190 | <tempfile property="variable.file" destdir="${dita.temp.dir}" prefix="strings." suffix=".xml"/>
|
---|
191 | <gen-variable file="${variable.file}">
|
---|
192 | <fileset dir="${customization.dir}/common/vars" erroronmissingdir="false">
|
---|
193 | <include name="*.xml"/>
|
---|
194 | </fileset>
|
---|
195 | <fileset dir="${cfg.common.dir}/vars">
|
---|
196 | <include name="*.xml"/>
|
---|
197 | </fileset>
|
---|
198 | </gen-variable>
|
---|
199 |
|
---|
200 | <condition property="document.locale" value="${default.locale}">
|
---|
201 | <not><isset property="document.locale"/></not>
|
---|
202 | </condition>
|
---|
203 |
|
---|
204 | <!-- WS runtime properties -->
|
---|
205 | <property file="${cfg.common.dir}/properties/${document.locale}.properties"/>
|
---|
206 |
|
---|
207 | <condition property="document.language" value="${default.language}">
|
---|
208 | <not><isset property="document.language"/></not>
|
---|
209 | </condition>
|
---|
210 | <echo level="info">Using document.locale=${document.locale}</echo>
|
---|
211 |
|
---|
212 | <condition property="formatter.specific.ext" value="_axf">
|
---|
213 | <and>
|
---|
214 | <not><isset property="formatter.specific.ext"/></not>
|
---|
215 | <equals arg1="ah" arg2="${pdf.formatter}"/>
|
---|
216 | </and>
|
---|
217 | </condition>
|
---|
218 | <condition property="formatter.specific.ext" value="_fop">
|
---|
219 | <and>
|
---|
220 | <not><isset property="formatter.specific.ext"/></not>
|
---|
221 | <equals arg1="fop" arg2="${pdf.formatter}"/>
|
---|
222 | </and>
|
---|
223 | </condition>
|
---|
224 | <condition property="formatter.specific.ext" value="_xep">
|
---|
225 | <and>
|
---|
226 | <not><isset property="formatter.specific.ext"/></not>
|
---|
227 | <equals arg1="xep" arg2="${pdf.formatter}"/>
|
---|
228 | </and>
|
---|
229 | </condition>
|
---|
230 | <condition property="formatter.specific.ext" value="">
|
---|
231 | <not><isset property="formatter.specific.ext"/></not>
|
---|
232 | </condition>
|
---|
233 |
|
---|
234 | <condition property="args.bookmark.style" value="">
|
---|
235 | <not><isset property="args.bookmark.style"/></not>
|
---|
236 | </condition>
|
---|
237 |
|
---|
238 | <condition property="args.chapter.layout" value="">
|
---|
239 | <not><isset property="args.chapter.layout"/></not>
|
---|
240 | </condition>
|
---|
241 |
|
---|
242 | <condition property="args.draft" value="no">
|
---|
243 | <not><isset property="args.draft"/></not>
|
---|
244 | </condition>
|
---|
245 |
|
---|
246 | <condition property="publish.required.cleanup" value="${args.draft}">
|
---|
247 | <and>
|
---|
248 | <not><isset property="publish.required.cleanup"/></not>
|
---|
249 | <isset property="args.draft"/>
|
---|
250 | </and>
|
---|
251 | </condition>
|
---|
252 |
|
---|
253 | <condition property="args.gen.task.lbl" value="">
|
---|
254 | <not><isset property="args.gen.task.lbl"/></not>
|
---|
255 | </condition>
|
---|
256 | <!-- use customized xsl file for pdf transform.-->
|
---|
257 | <condition property="temp.transformation.file" value="${args.xsl.pdf}">
|
---|
258 | <and>
|
---|
259 | <isset property="args.xsl.pdf"/>
|
---|
260 | <available file="${args.xsl.pdf}" type="file"/>
|
---|
261 | </and>
|
---|
262 | </condition>
|
---|
263 | <condition property="temp.transformation.file" value="${dita.plugin.org.dita.pdf2.dir}/${args.xsl.pdf}">
|
---|
264 | <and>
|
---|
265 | <not><isset property="temp.transformation.file"/></not>
|
---|
266 | <isset property="args.xsl.pdf"/>
|
---|
267 | </and>
|
---|
268 | </condition>
|
---|
269 |
|
---|
270 | <condition property="args.bookmap-order" value="discard">
|
---|
271 | <not><isset property="args.bookmap-order"/></not>
|
---|
272 | </condition>
|
---|
273 |
|
---|
274 | <property name="temp.transformation.file" location="${xsl.fo.dir}/topic2fo_shell${formatter.specific.ext}.xsl"/>
|
---|
275 | </target>
|
---|
276 |
|
---|
277 | <target name="transform.topic2fo.index">
|
---|
278 | <taskdef classname="com.idiominc.ws.opentopic.fo.index2.IndexPreprocessorTask"
|
---|
279 | name="index-preprocess" classpathref="project.class.path"/>
|
---|
280 |
|
---|
281 | <condition property="index.config.file" value="${customization.dir}/common/index/${document.locale}.xml">
|
---|
282 | <and>
|
---|
283 | <not><isset property="index.config.file"/></not>
|
---|
284 | <available file="${customization.dir}/common/index/${document.locale}.xml"/>
|
---|
285 | </and>
|
---|
286 | </condition>
|
---|
287 | <condition property="index.config.file" value="${cfg.dir}/common/index/${document.locale}.xml">
|
---|
288 | <and>
|
---|
289 | <not><isset property="index.config.file"/></not>
|
---|
290 | <available file="${cfg.dir}/common/index/${document.locale}.xml"/>
|
---|
291 | </and>
|
---|
292 | </condition>
|
---|
293 | <condition property="index.config.file" value="${customization.dir}/common/index/${document.language}.xml">
|
---|
294 | <and>
|
---|
295 | <not><isset property="index.config.file"/></not>
|
---|
296 | <available file="${customization.dir}/common/index/${document.language}.xml"/>
|
---|
297 | </and>
|
---|
298 | </condition>
|
---|
299 | <condition property="index.config.file" value="${cfg.dir}/common/index/${document.language}.xml">
|
---|
300 | <and>
|
---|
301 | <not><isset property="index.config.file"/></not>
|
---|
302 | <available file="${cfg.dir}/common/index/${document.language}.xml"/>
|
---|
303 | </and>
|
---|
304 | </condition>
|
---|
305 | <condition property="index.config.file" value="${cfg.dir}/common/index/${default.language}.xml">
|
---|
306 | <not><isset property="index.config.file"/></not>
|
---|
307 | </condition>
|
---|
308 |
|
---|
309 | <index-preprocess input="${inputFile.url}" output="${dita.temp.dir}/stage1.xml"
|
---|
310 | indexConfig="${index.config.file}" locale="${document.locale}"
|
---|
311 | catalogs="${xml.catalog.files}"/>
|
---|
312 | </target>
|
---|
313 |
|
---|
314 | <target name="transform.topic2fo.flagging"
|
---|
315 | depends="transform.topic2fo.flagging.filter,
|
---|
316 | transform.topic2fo.flagging.no-filter"/>
|
---|
317 | <target name="transform.topic2fo.flagging.filter" if="dita.input.valfile">
|
---|
318 | <condition property="_org.dita.pdf2.valfile" value="${dita.input.valfile}">
|
---|
319 | <available file="${dita.input.valfile}" type="file"/>
|
---|
320 | </condition>
|
---|
321 | <condition property="_org.dita.pdf2.valfile" value="${dita.plugin.org.dita.pdf2.dir}/${dita.input.valfile}">
|
---|
322 | <not><isset property="_org.dita.pdf2.valfile"/></not>
|
---|
323 | </condition>
|
---|
324 | <makeurl property="_org.dita.pdf2.valfile.url" file="${_org.dita.pdf2.valfile}" validate="no"/>
|
---|
325 | <xslt in="${dita.temp.dir}/stage1.xml" out="${dita.temp.dir}/stage1a.xml" style="${xsl.fo.dir}/flagging-preprocess.xsl">
|
---|
326 | <param name="filterFile" expression="${_org.dita.pdf2.valfile.url}"/>
|
---|
327 | <xmlcatalog>
|
---|
328 | <catalogpath path="${xml.catalog.files}"/>
|
---|
329 | </xmlcatalog>
|
---|
330 | </xslt>
|
---|
331 | </target>
|
---|
332 | <target name="transform.topic2fo.flagging.no-filter" unless="dita.input.valfile">
|
---|
333 | <copy file="${dita.temp.dir}/stage1.xml" tofile="${dita.temp.dir}/stage1a.xml"/>
|
---|
334 | </target>
|
---|
335 |
|
---|
336 | <target name="transform.topic2fo.main">
|
---|
337 | <!--makeurl seems to output file:/C: style instead of file:///C:, but xep, fop, and ah all accept it.-->
|
---|
338 | <makeurl property="artworkPrefixUrl" file="${artworkPrefix}"/>
|
---|
339 | <makeurl property="dita.map.output.dir.url" file="${pdf2.temp.dir}" validate="no"/>
|
---|
340 | <makeurl property="work.dir.url" file="${dita.temp.dir}" validate="no"/>
|
---|
341 | <makeurl property="customization.dir.url" file="${customization.dir}"/>
|
---|
342 | <makeurl property="user.input.dir.url" file="${dita.input.dirname}"/>
|
---|
343 | <makeurl property="variable.file.url" file="${variable.file}"/>
|
---|
344 |
|
---|
345 | <xslt style="${temp.transformation.file}"
|
---|
346 | in="${dita.temp.dir}/stage1a.xml"
|
---|
347 | out="${dita.temp.dir}/stage2.fo">
|
---|
348 | <param name="locale" expression="${document.locale}"/>
|
---|
349 | <param name="customizationDir.url" expression="${customization.dir.url}"/>
|
---|
350 | <param name="input.dir.url" expression="${user.input.dir.url}"/>
|
---|
351 | <param name="DRAFT" expression="${args.draft}"/>
|
---|
352 | <param name="output.dir.url" expression="${dita.map.output.dir.url}"/>
|
---|
353 | <param name="work.dir.url" expression="${work.dir.url}"/>
|
---|
354 | <param name="artworkPrefix" expression="${artworkPrefixUrl}"/>
|
---|
355 | <param name="publishRequiredCleanup" expression="${publish.required.cleanup}"/>
|
---|
356 | <param name="antArgsBookmarkStyle" expression="${args.bookmark.style}"/>
|
---|
357 | <param name="antArgsChapterLayout" expression="${args.chapter.layout}"/>
|
---|
358 | <param name="include.rellinks" expression="${include.rellinks}"/>
|
---|
359 | <param name="antArgsGenerateTaskLabels" expression="${args.gen.task.lbl}"/>
|
---|
360 | <param name="pdfFormatter" expression="${pdf.formatter}"/>
|
---|
361 | <param name="useFrameIndexMarkup" expression="${org.dita.pdf2.index.frame-markup}"/>
|
---|
362 | <param name="bookmap-order" expression="${args.bookmap-order}"/>
|
---|
363 | <param name="variableFiles.url" expression="${variable.file.url}"/>
|
---|
364 | <dita:extension id="dita.conductor.pdf2.param" behavior="org.dita.dost.platform.InsertAction"/>
|
---|
365 | <xmlcatalog>
|
---|
366 | <catalogpath path="${xml.catalog.files}"/>
|
---|
367 | </xmlcatalog>
|
---|
368 | </xslt>
|
---|
369 | </target>
|
---|
370 |
|
---|
371 | <target name="transform.topic2fo.i18n"
|
---|
372 | depends="transform.topic2fo.i18n.filter,
|
---|
373 | transform.topic2fo.i18n.no-filter"/>
|
---|
374 | <target name="transform.topic2fo.i18n.filter" unless="pdf2.i18n.skip">
|
---|
375 | <taskdef classname="com.idiominc.ws.opentopic.fo.i18n.PreprocessorTask" name="i18n-preprocess"
|
---|
376 | classpathref="project.class.path"/>
|
---|
377 |
|
---|
378 | <condition property="i18n.config.file" value="${customization.dir}/fo/i18n/${document.locale}.xml">
|
---|
379 | <and>
|
---|
380 | <not><isset property="i18n.config.file"/></not>
|
---|
381 | <available file="${customization.dir}/fo/i18n/${document.locale}.xml"/>
|
---|
382 | </and>
|
---|
383 | </condition>
|
---|
384 | <condition property="i18n.config.file" value="${cfg.fo.dir}/i18n/${document.locale}.xml">
|
---|
385 | <and>
|
---|
386 | <not><isset property="i18n.config.file"/></not>
|
---|
387 | <available file="${cfg.fo.dir}/i18n/${document.locale}.xml"/>
|
---|
388 | </and>
|
---|
389 | </condition>
|
---|
390 | <condition property="i18n.config.file" value="${customization.dir}/fo/i18n/${document.language}.xml">
|
---|
391 | <and>
|
---|
392 | <not><isset property="i18n.config.file"/></not>
|
---|
393 | <available file="${customization.dir}/fo/i18n/${document.language}.xml"/>
|
---|
394 | </and>
|
---|
395 | </condition>
|
---|
396 | <condition property="i18n.config.file" value="${cfg.fo.dir}/i18n/${document.language}.xml">
|
---|
397 | <and>
|
---|
398 | <not><isset property="i18n.config.file"/></not>
|
---|
399 | <available file="${cfg.fo.dir}/i18n/${document.language}.xml"/>
|
---|
400 | </and>
|
---|
401 | </condition>
|
---|
402 | <condition property="i18n.config.file" value="${cfg.fo.dir}/i18n/${default.language}.xml">
|
---|
403 | <not><isset property="i18n.config.file"/></not>
|
---|
404 | </condition>
|
---|
405 |
|
---|
406 | <i18n-preprocess input="${dita.temp.dir}/stage2.fo" output="${dita.temp.dir}/stage3.fo"
|
---|
407 | config="${i18n.config.file}" catalogs="${xml.catalog.files}"/>
|
---|
408 |
|
---|
409 | <xslt in="${dita.temp.dir}/stage3.fo" out="${pdf2.temp.dir}/topic.fo" style="${xsl.fo.dir}/i18n-postprocess.xsl">
|
---|
410 | <xmlcatalog>
|
---|
411 | <catalogpath path="${xml.catalog.files}"/>
|
---|
412 | </xmlcatalog>
|
---|
413 | </xslt>
|
---|
414 | </target>
|
---|
415 | <target name="transform.topic2fo.i18n.no-filter" if="pdf2.i18n.skip">
|
---|
416 | <echo level="info">Skip I18N font processing.</echo>
|
---|
417 | <move file="${dita.temp.dir}/stage2.fo" tofile="${pdf2.temp.dir}/topic.fo"/>
|
---|
418 | </target>
|
---|
419 |
|
---|
420 | <target name="transform.topic2pdf"
|
---|
421 | dita:extension="depends org.dita.dost.platform.InsertDependsAction"
|
---|
422 | dita:depends="copyCoreArtwork,
|
---|
423 | transform.topic2fo,
|
---|
424 | {depend.org.dita.pdf2.format.pre},
|
---|
425 | transform.fo2pdf,
|
---|
426 | {depend.org.dita.pdf2.format.post},
|
---|
427 | delete.fo2pdf.topic.fo"/>
|
---|
428 |
|
---|
429 | <target name="delete.fo2pdf.topic.fo" unless="retain.topic.fo">
|
---|
430 | <delete>
|
---|
431 | <!--Deleting the stage files isn't necessary, since it will be cleaned by clean-temp, and is useful for debugging.-->
|
---|
432 | <!--<fileset dir="${dita.temp.dir}" includes="stage?.*"/>-->
|
---|
433 | <fileset dir="${pdf2.temp.dir}" includes="topic.fo"/>
|
---|
434 | </delete>
|
---|
435 | </target>
|
---|
436 |
|
---|
437 | <target name="transform.fo2pdf"
|
---|
438 | dita:extension="depends org.dita.dost.platform.InsertDependsAction"
|
---|
439 | dita:depends="transform.fo2pdf.xep,
|
---|
440 | transform.fo2pdf.ah,
|
---|
441 | transform.fo2pdf.fop,
|
---|
442 | {depend.org.dita.pdf2.format}"/>
|
---|
443 |
|
---|
444 | <target name="copyCoreArtwork">
|
---|
445 | <copy todir="${artwork.dir}/Configuration/OpenTopic" failonerror="false">
|
---|
446 | <fileset dir="${dita.plugin.org.dita.pdf2.dir}" includes="cfg/common/artwork/**/*.*"/>
|
---|
447 | </copy>
|
---|
448 | <copy todir="${artwork.dir}/Customization/OpenTopic" failonerror="false">
|
---|
449 | <fileset dir="${customization.dir}" includes="common/artwork/**/*.*"/>
|
---|
450 | </copy>
|
---|
451 | </target>
|
---|
452 |
|
---|
453 | </project>
|
---|