-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_dita2docbook.xml
64 lines (59 loc) · 2.24 KB
/
build_dita2docbook.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
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is part of the DITA Open Toolkit project.
See the accompanying license.txt file for applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. -->
<project name="dita2docbook">
<target name="dita2docbook"
depends="build-init, preprocess, topic2docbook, map2docbook">
</target>
<target name="topic2docbook" if="noMap">
<antcall target="dita.topic.docbook">
<param name="inputFile"
value="${dita.temp.dir}${file.separator}${user.input.file}" />
<param name="outputFile"
value="${dita.map.output.dir}${file.separator}${dita.topic.filename.root}.xml" />
</antcall>
</target>
<target name="map2docbook" unless="noMap">
<antcall target="dita.map.docbook">
<param name="mapRoot" value="${dita.map.filename.root}" />
<param name="inputMap" value="${user.input.file}" />
<param name="inputDir" value="${dita.temp.dir}" />
<param name="outputDir" value="${dita.map.output.dir}" />
</antcall>
</target>
<!-- Build DocBook output from ditamap -->
<target name="dita.map.docbook"
description="Build DocBook output from ditamap">
<condition property="args.xsl"
value="${dita.plugin.org.dita.docbook.dir}/xsl/map2docbook.xsl">
<not>
<isset property="args.xsl" />
</not>
</condition>
<mkdir dir="${outputDir}" />
<xslt in="${inputDir}${file.separator}${inputMap}"
out="${outputDir}${file.separator}${mapRoot}.xml"
classpathref="dost.class.path"
style="${args.xsl}">
<param name="outputdir" expression="${outputDir}" />
<param name="defaultLanguage" expression="${default.language}"/>
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
<!-- Build DocBook output from dita topic -->
<target name="dita.topic.docbook"
description="Build DocBook output from dita topic">
<condition property="args.xsl"
value="${dita.plugin.org.dita.docbook.dir}/xsl/dita2docbook.xsl">
<not>
<isset property="args.xsl" />
</not>
</condition>
<xslt in="${inputFile}" out="${outputFile}"
classpathref="dost.class.path"
style="${args.xsl}">
<xmlcatalog refid="dita.catalog"/>
</xslt>
</target>
</project>