build_preprocess.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <?xml version="1.0" encoding="UTF-8"?><!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. .
  2. See the accompanying license.txt file for applicable licenses.--><!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. --><project xmlns:dita="http://dita-ot.sourceforge.net" name="ditaot-preprocess">
  3. <!-- Set to "true" if you get out-of-memory errors during preprocess
  4. while processing very large (thousands of files) document sets. -->
  5. <condition property="dita.preprocess.reloadstylesheet" value="${conserve-memory}">
  6. <and>
  7. <not><isset property="dita.preprocess.reloadstylesheet"/></not>
  8. <isset property="conserve-memory"/>
  9. </and>
  10. </condition>
  11. <target name="preprocess" depends="preprocess.init,gen-list,debug-filter,mapref,branch-filter,copy-files,keyref,copy-to,conrefpush,conref,profile,topic-fragment,chunk,move-meta-entries,maplink,topicpull,flag-module,clean-map" description="Preprocessing ended"/>
  12. <target name="preprocess.init">
  13. <dita-ot-fail id="DOTA002F">
  14. <condition>
  15. <not><isset property="args.input"/></not>
  16. </condition>
  17. </dita-ot-fail>
  18. <basename property="dita.input.filename" file="${args.input}"/>
  19. <basename property="dita.map.filename.root" file="${dita.input.filename}" suffix=".ditamap"/>
  20. <basename property="dita.topic.filename.root" file="${dita.input.filename}" suffix=".dita"/>
  21. <echo level="info">*****************************************************************</echo>
  22. <echo level="info">* input = ${args.input}</echo>
  23. <echo level="info">*****************************************************************</echo>
  24. </target>
  25. <!-- clean-temp
  26. Remove anything in the ${dita.temp.dir} directory before starting. -->
  27. <target name="clean-temp" unless="clean-temp.skip" depends="" description="Clean temp directory">
  28. <delete includeemptydirs="true" failonerror="no">
  29. <fileset dir="${dita.temp.dir}"/>
  30. </delete>
  31. </target>
  32. <!-- gen-list
  33. Create the manifest files listing which files are referenced by the input file (even indirectly). -->
  34. <target name="gen-list" depends="" unless="preprocess.gen-list.skip" description="Generate file list">
  35. <pipeline message="Generate list." taskname="gen-list" inputmap="${args.input}">
  36. <module class="org.dita.dost.module.GenMapAndTopicListModule">
  37. <param name="inputdir" location="${args.input.dir}" if="args.input.dir"/>
  38. <param name="ditadir" location="${dita.dir}"/>
  39. <param name="ditaval" location="${dita.input.valfile}" if="dita.input.valfile"/>
  40. <param name="validate" value="${validate}"/>
  41. <param name="generatecopyouter" value="${generate.copy.outer}"/>
  42. <param name="outercontrol" value="${outer.control}"/>
  43. <param name="onlytopicinmap" value="${onlytopic.in.map}"/>
  44. <param name="outputdir" location="${output.dir}"/>
  45. <param name="transtype" value="${transtype}"/>
  46. <param name="gramcache" value="${args.grammar.cache}"/>
  47. <param name="setsystemid" value="${args.xml.systemid.set}"/>
  48. <param name="profiling.enable" value="${filter-on-parse}" unless="filter-on-parse"/>
  49. <param name="processing-mode" value="${processing-mode}" if="processing-mode"/>
  50. </module>
  51. </pipeline>
  52. </target>
  53. <!-- debug-filter
  54. Copy input files to ${dita.temp.dir} tree.
  55. While copying, populate default attributes like @class,
  56. add @xtrf and @xtrc and filter out elements according to valfile, if any. -->
  57. <target name="debug-filter" depends="" unless="preprocess.debug-filter.skip" description="Debug and filter input files">
  58. <pipeline message="Debug and filtering." taskname="filter">
  59. <module class="org.dita.dost.module.DebugAndFilterModule">
  60. <param name="ditaval" location="${dita.input.valfile}" if="dita.input.valfile"/>
  61. <param name="ditadir" location="${dita.dir}"/>
  62. <param name="validate" value="${validate}"/>
  63. <param name="transtype" value="${transtype}"/>
  64. <param name="gramcache" value="${args.grammar.cache}"/>
  65. <param name="setsystemid" value="${args.xml.systemid.set}"/>
  66. <param name="profiling.enable" value="${filter-on-parse}" unless="filter-on-parse"/>
  67. <param name="force-unique" value="${force-unique}" if="force-unique"/>
  68. <param name="generate-debug-attributes" value="${generate-debug-attributes}" if="generate-debug-attributes"/>
  69. <param name="processing-mode" value="${processing-mode}" if="processing-mode"/>
  70. </module>
  71. </pipeline>
  72. <!-- generate list files -->
  73. <job-helper file="outditafiles.list" property="outditafileslist"/>
  74. <job-helper file="fullditamapandtopic.list" property="fullditamapandtopiclist"/>
  75. <job-helper file="fullditatopic.list" property="fullditatopiclist"/>
  76. <job-helper file="fullditamap.list" property="fullditamaplist"/>
  77. <job-helper file="hrefditatopic.list" property="hrefditatopiclist"/>
  78. <job-helper file="conref.list" property="conreflist"/>
  79. <!-- Deprecated since 2.1 -->
  80. <job-helper file="image.list" property="imagelist"/>
  81. <job-helper file="flagimage.list" property="flagimagelist"/>
  82. <!-- Deprecated since 2.1 -->
  83. <job-helper file="html.list" property="htmllist"/>
  84. <job-helper file="canditopics.list" property="canditopicslist"/>
  85. <job-helper file="subjectscheme.list" property="subjectschemelist"/>
  86. <job-helper file="conreftargets.list" property="conreftargetslist"/>
  87. <job-helper file="copytosource.list" property="copytosourcelist"/>
  88. <job-helper file="subtargets.list" property="subtargetslist"/>
  89. <job-helper file="resourceonly.list" property="resourceonlylist"/>
  90. <job-helper file="user.input.file.list" property="user.input.file"/>
  91. <job-helper file="hreftargets.list" property="hreftargetslist"/>
  92. <job-helper file="conref.list" property="conreflist"/>
  93. <job-helper file="hrefditatopic.list" property="hrefditatopiclist"/>
  94. <job-helper file="fullditatopic.list" property="fullditatopiclist"/>
  95. <job-helper file="fullditamapandtopic.list" property="fullditamapandtopiclist"/>
  96. <job-helper file="conreftargets.list" property="conreftargetslist"/>
  97. <job-helper file="canditopics.list" property="canditopicslist"/>
  98. <job-helper file="resourceonly.list" property="resourceonlylist"/>
  99. <job-property dir="${dita.temp.dir}"/>
  100. <property name="outditafilesfile" value="outditafiles.list"/>
  101. <property name="fullditamapandtopicfile" value="fullditamapandtopic.list"/>
  102. <property name="fullditatopicfile" value="fullditatopic.list"/>
  103. <property name="fullditamapfile" value="fullditamap.list"/>
  104. <property name="hrefditatopicfile" value="hrefditatopic.list"/>
  105. <!-- Deprecated since 2.3 -->
  106. <property name="conreffile" value="conref.list"/>
  107. <!-- Deprecated since 2.1 -->
  108. <property name="imagefile" value="image.list"/>
  109. <property name="flagimagefile" value="flagimage.list"/>
  110. <!-- Deprecated since 2.1 -->
  111. <property name="htmlfile" value="html.list"/>
  112. <property name="hreftargetsfile" value="hreftargets.list"/>
  113. <property name="canditopicsfile" value="canditopics.list"/>
  114. <property name="subjectschemefile" value="subjectscheme.list"/>
  115. <property name="conreftargetsfile" value="conreftargets.list"/>
  116. <property name="copytosourcefile" value="copytosource.list"/>
  117. <property name="subtargetsfile" value="subtargets.list"/>
  118. <property name="resourceonlyfile" value="resourceonly.list"/>
  119. <dirname property="_dita.map.output.dir" file="${output.dir}/${user.input.file}"/>
  120. <dirname property="_dita.map.temp.dir" file="${dita.temp.dir}/${user.input.file}"/>
  121. <property name="dita.map.output.dir" location="${_dita.map.output.dir}/${uplevels}"/>
  122. <condition property="noMap">
  123. <length file="${dita.temp.dir}/${fullditamapfile}" length="0"/>
  124. </condition>
  125. <condition property="noImagelist">
  126. <length file="${dita.temp.dir}/${imagefile}" length="0"/>
  127. </condition>
  128. </target>
  129. <!-- profile -->
  130. <target name="profile" depends="profile-check" unless="preprocess.profile.skip" description="Profile input files">
  131. <pipeline message="Profile filtering." taskname="profile" inputmap="${args.input}">
  132. <module class="org.dita.dost.module.FilterModule">
  133. <!--param name="ditadir" location="${dita.dir}"/-->
  134. <param name="ditaval" location="${dita.input.valfile}" if="dita.input.valfile"/>
  135. <!--param name="inputdir" location="${args.input.dir}" if="args.input.dir"/-->
  136. <!--param name="outputdir" location="${output.dir}"/-->
  137. <!--param name="setsystemid" value="${args.xml.systemid.set}"/-->
  138. <param name="transtype" value="${transtype}"/>
  139. </module>
  140. </pipeline>
  141. <!-- update list files -->
  142. <job-helper file="fullditatopic.list" property="fullditatopiclist"/>
  143. <job-helper file="fullditamap.list" property="fullditamaplist"/>
  144. <job-helper file="fullditamapandtopic.list" property="fullditamapandtopiclist"/>
  145. <job-helper file="resourceonly.list" property="resourceonlylist"/>
  146. <job-helper file="copytosource.list" property="copytosourcelist"/>
  147. <job-property dir="${dita.temp.dir}"/>
  148. <condition property="noTopic">
  149. <length file="${dita.temp.dir}/${fullditatopicfile}" length="0"/>
  150. </condition>
  151. </target>
  152. <target name="profile-check">
  153. <condition property="preprocess.profile.skip">
  154. <!--not>
  155. <isset property="dita.input.valfile"/>
  156. </not-->
  157. <istrue value="${filter-on-parse}"/>
  158. </condition>
  159. </target>
  160. <target name="branch-filter">
  161. <pipeline taskname="branch-filter" message="Filter branches">
  162. <module class="org.dita.dost.module.BranchFilterModule"/>
  163. </pipeline>
  164. </target>
  165. <!-- conref push
  166. Push information to the specified target -->
  167. <target name="conrefpush" depends="" unless="preprocess.conrefpush.skip" description="Resolve conref push">
  168. <pipeline message="Resolve conref push." taskname="conref-push">
  169. <module class="org.dita.dost.module.ConrefPushModule"/>
  170. </pipeline>
  171. <job-helper file="conref.list" property="conreflist"/>
  172. </target>
  173. <!-- move-meta-entries
  174. Push information from <topicmeta> in the map into the corresponding topics and
  175. pull metadata (such as navtitle) into the map from the referenced topics. -->
  176. <target name="move-meta-entries" depends="" unless="preprocess.move-meta-entries.skip" description="Move metadata entries">
  177. <pipeline message="Move metadata entries." taskname="move-meta" inputmap="${user.input.file}">
  178. <module class="org.dita.dost.module.MoveMetaModule">
  179. <param name="style" location="${dita.plugin.org.dita.base.dir}/xsl/preprocess/mappull.xsl"/>
  180. <param name="conserve-memory" expression="${conserve-memory}" if="conserve-memory"/>
  181. <param name="TRANSTYPE" expression="${transtype}"/>
  182. </module>
  183. </pipeline>
  184. </target>
  185. <!-- conref
  186. Pull elements referenced by conref into their correct place. -->
  187. <target name="conref" depends="conref-check" unless="preprocess.conref.skip" description="Resolve conref in input files">
  188. <condition property="dita.preprocess.reloadstylesheet.conref" value="${dita.preprocess.reloadstylesheet}">
  189. <not><isset property="dita.preprocess.reloadstylesheet.conref"/></not>
  190. </condition>
  191. <makeurl property="exportfile.url" file="${dita.temp.dir}/export.xml" validate="false"/>
  192. <pipeline message="Resolve conref in input files" taskname="conref">
  193. <xslt basedir="${dita.temp.dir}" reloadstylesheet="${dita.preprocess.reloadstylesheet.conref}" style="${dita.plugin.org.dita.base.dir}/xsl/preprocess/conref.xsl" filenameparameter="file-being-processed">
  194. <ditaFileset conref="true"/>
  195. <param name="EXPORTFILE" expression="${exportfile.url}"/>
  196. <param name="TRANSTYPE" expression="${transtype}"/>
  197. <xmlcatalog refid="dita.catalog"/>
  198. </xslt>
  199. </pipeline>
  200. </target>
  201. <!-- Deprecated since 2.3 -->
  202. <target name="conref-check">
  203. </target>
  204. <target name="topic-fragment" depends="" description="Normalize same topic fragment identifiers and table column names, and resolve coderef">
  205. <pipeline message="Resolve topic fragment." taskname="topic-fragment">
  206. <sax format="dita">
  207. <filter class="org.dita.dost.writer.TopicFragmentFilter">
  208. <param name="attributes" value="href"/>
  209. </filter>
  210. <filter class="org.dita.dost.writer.NormalizeTableFilter">
  211. <param name="processing-mode" value="${processing-mode}" if="processing-mode"/>
  212. </filter>
  213. <filter class="org.dita.dost.writer.CoderefResolver" unless="preprocess.coderef.skip"/>
  214. </sax>
  215. </pipeline>
  216. </target>
  217. <!-- coderef -->
  218. <!-- Deprecated since 2.3 -->
  219. <target name="coderef" unless="preprocess.coderef.skip" description="Resolve coderef in input files">
  220. <echo level="warn">WARN: Coderef target has been merged with topic-fragment and is deprecated.</echo>
  221. </target>
  222. <!-- mapref
  223. Produce a logical super-map from the map references
  224. (topicref with format="ditamap") in the input map. -->
  225. <target name="mapref" depends="mapref-check" unless="preprocess.mapref.skip" description="Resolve mapref in ditamap">
  226. <condition property="dita.preprocess.reloadstylesheet.mapref" value="${dita.preprocess.reloadstylesheet}">
  227. <not><isset property="dita.preprocess.reloadstylesheet.mapref"/></not>
  228. </condition>
  229. <dirname property="mapref.workdir" file="${dita.temp.dir}/${user.input.file}"/>
  230. <pipeline message="Resolve mapref in ditamap" taskname="mapref">
  231. <xslt basedir="${dita.temp.dir}" reloadstylesheet="${dita.preprocess.reloadstylesheet.mapref}" style="${dita.plugin.org.dita.base.dir}/xsl/preprocess/mapref.xsl" filenameparameter="file-being-processed">
  232. <ditafileset format="ditamap"/>
  233. <param name="TRANSTYPE" expression="${transtype}"/>
  234. <xmlcatalog refid="dita.catalog"/>
  235. </xslt>
  236. </pipeline>
  237. </target>
  238. <target name="mapref-check">
  239. <condition property="preprocess.mapref.skip">
  240. <isset property="noMap"/>
  241. </condition>
  242. </target>
  243. <!-- keyref
  244. Resolve keyref using key definition in ditamap-->
  245. <target name="keyref" depends="" unless="preprocess.keyref.skip" description="Resolve keyref">
  246. <pipeline message="Resolve keyref." taskname="keyref">
  247. <module class="org.dita.dost.module.KeyrefModule">
  248. <param name="transtype" value="${transtype}"/>
  249. </module>
  250. </pipeline>
  251. <pipeline message="Resolve mapref in ditamap" taskname="mapref">
  252. <xslt basedir="${dita.temp.dir}" reloadstylesheet="${dita.preprocess.reloadstylesheet.mapref}" style="${dita.plugin.org.dita.base.dir}/xsl/preprocess/mapref.xsl" filenameparameter="file-being-processed">
  253. <ditaFileset format="ditamap"/>
  254. <param name="TRANSTYPE" expression="${transtype}"/>
  255. <param name="child-topicref-warning" expression="false"/>
  256. <param name="keep-submap-href" expression="false"/>
  257. <param name="TRANSTYPE" expression="${transtype}"/>
  258. <xmlcatalog refid="dita.catalog"/>
  259. </xslt>
  260. </pipeline>
  261. </target>
  262. <target name="copy-to">
  263. <pipeline message="Resolve copy-to." taskname="copy-to">
  264. <module class="org.dita.dost.module.CopyToModule"/>
  265. </pipeline>
  266. </target>
  267. <!-- mappull
  268. Pull metadata (such as navtitle) into the map from the referenced topics. -->
  269. <!-- Deprecated in 2.2 -->
  270. <target name="mappull" depends="mappull-check" unless="preprocess.mappull.skip" description="Pull the navtitle and topicmeta from topics to ditamap">
  271. <echo level="warn">WARN: Mappull target has been merged with move-meta-entries and is deprecated.</echo>
  272. </target>
  273. <!-- Deprecated in 2.2 -->
  274. <target name="mappull-check">
  275. <condition property="preprocess.mappull.skip">
  276. <isset property="noMap"/>
  277. </condition>
  278. </target>
  279. <!-- chunk
  280. Assemble virtual supertopics based on chunk attribute in map. -->
  281. <target name="chunk" depends="chunk-check" unless="preprocess.chunk.skip" description="Process chunks">
  282. <pipeline message="Process chunks." taskname="chunk" inputmap="${user.input.file}">
  283. <module class="org.dita.dost.module.ChunkModule">
  284. <param name="transtype" value="${transtype}"/>
  285. <param name="root-chunk-override" value="${root-chunk-override}" if="root-chunk-override"/>
  286. </module>
  287. </pipeline>
  288. <job-helper file="fullditatopic.list" property="fullditatopiclist"/>
  289. <job-helper file="fullditamap.list" property="fullditamaplist"/>
  290. <job-helper file="fullditamapandtopic.list" property="fullditamapandtopiclist"/>
  291. <job-helper file="resourceonly.list" property="resourceonlylist"/>
  292. <job-helper file="copytosource.list" property="copytosourcelist"/>
  293. <job-property dir="${dita.temp.dir}"/>
  294. <condition property="noTopic">
  295. <length file="${dita.temp.dir}/${fullditatopicfile}" length="0"/>
  296. </condition>
  297. </target>
  298. <target name="chunk-check">
  299. <condition property="preprocess.chunk.skip">
  300. <isset property="noMap"/>
  301. </condition>
  302. </target>
  303. <!-- maplink
  304. Collect all links from maps and push them into topics. -->
  305. <target name="maplink" depends="maplink-check" unless="preprocess.maplink.skip" description="Find and generate related link information">
  306. <condition property="dita.preprocess.reloadstylesheet.maplink" value="${dita.preprocess.reloadstylesheet}">
  307. <not><isset property="dita.preprocess.reloadstylesheet.maplink"/></not>
  308. </condition>
  309. <pipeline message="Move related links" taskname="maplink" inputmap="${user.input.file}">
  310. <module class="org.dita.dost.module.MoveLinksModule">
  311. <param name="style" location="${dita.plugin.org.dita.base.dir}/xsl/preprocess/maplink.xsl"/>
  312. <param name="include.rellinks" expression="${include.rellinks}" if="include.rellinks"/>
  313. <!--dita:extension id="dita.preprocess.maplink.param" behavior="org.dita.dost.platform.InsertAction"/-->
  314. </module>
  315. </pipeline>
  316. </target>
  317. <target name="maplink-check">
  318. <condition property="preprocess.maplink.skip">
  319. <isset property="noMap"/>
  320. </condition>
  321. </target>
  322. <!-- topicpull
  323. Populate link text for links within topics (xref, link). -->
  324. <target name="topicpull" depends="topicpull-check" unless="preprocess.topicpull.skip" description="Pull metadata for link and xref element">
  325. <condition property="dita.preprocess.reloadstylesheet.topicpull" value="${dita.preprocess.reloadstylesheet}">
  326. <not><isset property="dita.preprocess.reloadstylesheet.topicpull"/></not>
  327. </condition>
  328. <pipeline message="Pull metadata for link and xref element" taskname="topicpull">
  329. <xslt basedir="${dita.temp.dir}" reloadstylesheet="${dita.preprocess.reloadstylesheet.topicpull}" style="${dita.plugin.org.dita.base.dir}/xsl/preprocess/topicpull.xsl">
  330. <ditaFileset format="dita"/>
  331. <param name="TABLELINK" expression="${args.tablelink.style}" if="args.tablelink.style"/>
  332. <param name="FIGURELINK" expression="${args.figurelink.style}" if="args.figurelink.style"/>
  333. <param name="ONLYTOPICINMAP" expression="${onlytopic.in.map}" if="onlytopic.in.map"/>
  334. <param name="defaultLanguage" expression="${default.language}"/>
  335. <xmlcatalog refid="dita.catalog"/>
  336. </xslt>
  337. </pipeline>
  338. </target>
  339. <target name="topicpull-check">
  340. <condition property="preprocess.topicpull.skip">
  341. <isset property="noTopic"/>
  342. </condition>
  343. </target>
  344. <target name="flag-module" depends="flag-module-check" description="Add flagging information to topics" unless="preprocess.flagging.skip">
  345. <makeurl file="${args.filter}" property="dita.input.filterfile.url" validate="no"/>
  346. <condition property="dita.preprocess.reloadstylesheet.flag-module" value="${dita.preprocess.reloadstylesheet}">
  347. <not><isset property="dita.preprocess.reloadstylesheet.flag-module"/></not>
  348. </condition>
  349. <pipeline message="Add flagging information to topics" taskname="preprocess_flag">
  350. <xslt basedir="${dita.temp.dir}" reloadstylesheet="${dita.preprocess.reloadstylesheet.flag-module}" style="${dita.plugin.org.dita.base.dir}/xsl/preprocess/flag.xsl" filenameparameter="FILENAME" filedirparameter="FILEDIR">
  351. <ditaFileset format="dita" processingRole="normal"/>
  352. <param name="TRANSTYPE" expression="${transtype}"/>
  353. <param name="FILTERFILEURL" expression="${dita.input.filterfile.url}"/>
  354. <param name="DRAFT" expression="${args.draft}" if="args.draft"/>
  355. <param name="BASEDIR" expression="${basedir}"/>
  356. <param name="OUTPUTDIR" expression="${output.dir}"/>
  357. <param name="DBG" expression="${args.debug}" if="args.debug"/>
  358. <param name="defaultLanguage" expression="${default.language}"/>
  359. <xmlcatalog refid="dita.catalog"/>
  360. </xslt>
  361. </pipeline>
  362. </target>
  363. <target name="flag-module-check">
  364. <condition property="preprocess.flagging.skip">
  365. <or>
  366. <isset property="noTopic"/>
  367. <not>
  368. <isset property="args.filter"/>
  369. </not>
  370. </or>
  371. </condition>
  372. </target>
  373. <!-- Clean maps from processing time -->
  374. <target name="clean-map" depends="clean-map-check" unless="preprocess.clean-map-check.skip" description="Clean ditamap">
  375. <condition property="dita.preprocess.reloadstylesheet.clean-map" value="${dita.preprocess.reloadstylesheet}">
  376. <not><isset property="dita.preprocess.reloadstylesheet.clean-map"/></not>
  377. </condition>
  378. <pipeline message="Resolve mapref in ditamap" taskname="mapref">
  379. <xslt basedir="${dita.temp.dir}" reloadstylesheet="${dita.preprocess.reloadstylesheet.clean-map}" style="${dita.plugin.org.dita.base.dir}/xsl/preprocess/clean-map.xsl">
  380. <ditaFileset format="ditamap"/>
  381. <xmlcatalog refid="dita.catalog"/>
  382. </xslt>
  383. </pipeline>
  384. </target>
  385. <target name="clean-map-check">
  386. <condition property="preprocess.clean-map-check.skip">
  387. <isset property="noMap"/>
  388. </condition>
  389. </target>
  390. <!-- copy-files
  391. Copy files to the output directory. -->
  392. <target name="copy-files" depends="copy-image,copy-html,copy-flag" unless="preprocess.copy-files.skip"/>
  393. <target name="copy-image" unless="preprocess.copy-image.skip" depends="" description="Copy image files">
  394. <condition property="copy-image.todir" value="${output.dir}/${uplevels}" else="${output.dir}">
  395. <equals arg1="${generate.copy.outer}" arg2="1"/>
  396. </condition>
  397. <copy todir="${copy-image.todir}" failonerror="false">
  398. <dita-fileset format="image"/>
  399. </copy>
  400. </target>
  401. <target name="copy-html" depends="" unless="preprocess.copy-html.skip" description="Copy html files">
  402. <copy todir="${output.dir}" failonerror="false">
  403. <dita-fileset format="html"/>
  404. </copy>
  405. </target>
  406. <target name="copy-flag" depends="copy-flag-check" unless="preprocess.copy-flag.skip" description="Copy flag files">
  407. <dita-ot-copy todir="${output.dir}" includesfile="${dita.temp.dir}/${flagimagefile}" relativepaths="${relflagimagelist}"/>
  408. </target>
  409. <target name="copy-flag-check">
  410. <condition property="preprocess.copy-flag.skip">
  411. <or>
  412. <isset property="preprocess.copy-files.skip"/>
  413. <not><isset property="dita.input.valfile"/></not>
  414. </or>
  415. </condition>
  416. </target>
  417. <!-- Deprecated since 2.1 -->
  418. <target name="copy-subsidiary" depends="copy-subsidiary-check" unless="preprocess.copy-subsidiary.skip" description="Copy subsidiary files">
  419. <dita-ot-echo id="DOTX070W"><param name="1" value="copy-subsidiary"/></dita-ot-echo>
  420. <copy todir="${dita.temp.dir}">
  421. <fileset dir="${user.input.dir}" includesfile="${dita.temp.dir}/${subtargetsfile}"/>
  422. </copy>
  423. </target>
  424. <!-- Deprecated since 2.1 -->
  425. <target name="copy-subsidiary-check">
  426. <dita-ot-echo id="DOTX070W"><param name="1" value="copy-subsidiary-check"/></dita-ot-echo>
  427. <condition property="preprocess.copy-subsidiary.skip">
  428. <or>
  429. <isset property="preprocess.copy-files.skip"/>
  430. <length file="${dita.temp.dir}/${subtargetsfile}" length="0"/>
  431. </or>
  432. </condition>
  433. </target>
  434. </project>