File: build_demo.xml

package info (click to toggle)
dita-ot 1.5.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 16,788 kB
  • sloc: xml: 27,153; java: 23,846; makefile: 23
file content (886 lines) | stat: -rw-r--r-- 34,250 bytes parent folder | download | duplicates (3)
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This file is part of the DITA Open Toolkit project hosted on 
     Sourceforge.net. See the accompanying license.txt file for 
     applicable licenses.-->
<!-- (c) Copyright IBM Corp. 2001, 2006 All Rights Reserved. -->
<project name="dita.build.demo" default="prompt" basedir=".">
	<!-- Set a property for each environment variable -->
	<description>Build the DITA Demos and Samples</description>
	<property environment="env"/>

  <import file="${basedir}${file.separator}build.xml"/>

	<target name="use.init">
        <available classname="net.sf.saxon.StyleSheet"
			property="hasSaxon"/>
		<available classname="org.apache.fop.tools.anttasks.Fop"
			property="hasFOP"/>
		<available file="C:\Program Files\HTML Help Workshop\hhc.exe"
			property="HTMLHelpCompiler"
			value="C:\Program Files\HTML Help Workshop\hhc.exe"/>
		<property name="dita.extname" value=".xml"/>
		<property name="clean.temp" value="true"/>
	</target>

	<target name="all" description="build all output" 
		depends="demo, samples">
		<echo>Output from the demo build is in the directory
${dita.output.dir}

Previous releases also built a copy of the DITA 1.1 Language
specification. The toolkit now fully supports DITA 1.2, but
that specification is not included here due to its size.
Source material and published versions of the latest DITA 1.2
specification can be found here:
http://docs.oasis-open.org/dita/v1.2/spec/DITA1.2-spec.html</echo>
	</target>
	<!-- revise below here -->

	<!-- defaults for DITA configuration required by callable targets -->
	<property name="dita.dir" value="${basedir}"/>
	<property name="dita.script.dir"
		value="${dita.dir}${file.separator}xsl"/>
	<property name="dita.dtd.dir"
		value="${dita.dir}${file.separator}dtd"/>
	<property name="dita.css.dir"
		value="${dita.dir}${file.separator}css"/>
	<property name="dita.resource.dir"
		value="${dita.dir}${file.separator}resource"/>

	<!-- defaults for DITA output configuration -->
	<property name="dita.doc.dir"
		value="${dita.dir}${file.separator}doc"/>
	<property name="dita.doc.langref.dir"
		value="${dita.doc.dir}${file.separator}langref-dita1.1"/>
	<property name="dita.doc.articles.dir"
		value="${dita.doc.dir}${file.separator}articles"/>

	<property name="dita.demo.dir"
		value="${dita.dir}${file.separator}demo"/>
	<property name="dita.demo.book.dir"
		value="${dita.dir}${file.separator}samples"/>
	<property name="dita.demo.elementref.dir"
		value="${dita.demo.dir}${file.separator}elementref"/>
	<property name="dita.demo.enote.dir"
		value="${dita.demo.dir}${file.separator}enote"/>
	<property name="dita.demo.faq.dir"
		value="${dita.demo.dir}${file.separator}faq"/>
	
	<property name="dita.samples.dir"
		value="${dita.dir}${file.separator}samples"/>

	<property name="dita.output.dir"
		value="${dita.dir}${file.separator}out"/>

	<property name="dita.output.demo.dir"
		value="${dita.output.dir}${file.separator}demo"/>
	<property name="dita.output.demo.book.dir"
		value="${dita.output.demo.dir}${file.separator}book"/>
	<property name="dita.output.demo.elementref.dir"
		value="${dita.output.demo.dir}${file.separator}elementref"/>
	<property name="dita.output.demo.enote.dir"
		value="${dita.output.demo.dir}${file.separator}enote"/>
	<property name="dita.output.demo.faq.dir"
		value="${dita.output.demo.dir}${file.separator}faq"/>
	<property name="dita.output.demo.langref.dir"
		value="${dita.output.demo.dir}${file.separator}langref-dita1.1"/>

	<property name="dita.output.demo.langrefhelp.dir"
		value="${dita.output.demo.dir}${file.separator}langrefhelp-dita1.1"/>

	<property name="dita.output.doc.dir"
		value="${dita.output.dir}${file.separator}doc"/>
	<property name="dita.output.doc.langref.dir"
		value="${dita.output.doc.dir}${file.separator}langref-dita1.1"/>
	<property name="dita.output.doc.articles.dir"
		value="${dita.output.doc.dir}${file.separator}articles"/>

	<property name="dita.output.samples.dir"
		value="${dita.output.dir}${file.separator}samples"/>
	<property name="dita.output.samples.web.dir"
		value="${dita.output.samples.dir}${file.separator}web"/>
	<property name="dita.output.samples.eclipse.dir"
		value="${dita.output.samples.dir}${file.separator}org.dita.sample.doc"/>
	<property name="dita.output.samples.javahelp.dir"
		value="${dita.output.samples.dir}${file.separator}javahelp"/>
	<property name="dita.output.samples.htmlhelp.dir"
		value="${dita.output.samples.dir}${file.separator}htmlhelp"/>
	<property name="dita.output.samples.pdf.dir"
		value="${dita.output.samples.dir}${file.separator}pdf"/>
  
  	<property name="dita.output.samples.troff.dir"
  		value="${dita.output.samples.dir}${file.separator}troff"/>

	<property name="dita.output.docbook.dir"
		value="${dita.output.dir}${file.separator}docbook"/>



	<target name="clean"
		description="delete all output">
		<delete dir="${dita.output.dir}"/>
	</target>

	<!-- mid-level targets -->
	<target name="init"
		depends="use.init">
		<!-- Create the time stamp -->
		<tstamp/>
		<mkdir dir="${dita.temp.dir}"/>
		<mkdir dir="${dita.output.dir}"/>
	</target>

	<target name="demo"
		description="build the demos"
		depends="demo.book, demo.elementref, demo.enote, demo.faq">
	</target>

	<target name="init.demo"
		depends="init">
		<mkdir dir="${dita.output.demo.dir}"/>
	</target>

	<target name="demo.book"
		description="build the book demo"
		depends="init.demo">
		<mkdir dir="${dita.output.demo.book.dir}"/>
		<antcall target="dita2xhtml">
			<param name="args.input"
				value="${dita.demo.book.dir}${file.separator}taskbook.ditamap"/>
			<param name="output.dir"
				value="${dita.output.demo.book.dir}"/>
      		<param name="transtype" value="xhtml"/>
		</antcall>
		<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.demo.book.dir}${file.separator}taskbook.ditamap"/>
			<param name="output.dir"      value="${dita.output.demo.book.dir}"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>

	<target name="demo.elementref"
		description="build the element reference demo"
		depends="init.demo">
		<mkdir dir="${dita.output.demo.elementref.dir}"/>
		<antcall target="dita.elementref.toc">
			<param name="args.input"
				value="${dita.demo.elementref.dir}${file.separator}map-elements.ditamap"/>
			<param name="output.dir"     value="${dita.output.demo.elementref.dir}"/>
		</antcall>
		<antcall target="dita.elementref.html">
			<param name="inputFile"
				value="${dita.temp.dir}${file.separator}map.xml"/>
			<param name="outputFile"
				value="${dita.output.demo.elementref.dir}${file.separator}map.html"/>
		</antcall>
		<antcall target="dita.elementref.html">
			<param name="inputFile"
				value="${dita.temp.dir}${file.separator}topicref.xml"/>
			<param name="outputFile"
				value="${dita.output.demo.elementref.dir}${file.separator}topicref.html"/>
		</antcall>
	</target>
				
	<target name="dita.elementref.toc" depends="dita-preprocess, dita.map.xhtml">
	</target>

	<target name="dita.elementref.html">
		<xslt processor="trax"
				in="${inputFile}"
				out="${outputFile}"
				style="${dita.demo.elementref.dir}${file.separator}elementref2xhtml_shell.xsl">
			<param name="OUTEXT" expression=".html"/>
			<!--<xmlcatalog refid="dita.catalog"/>-->
		</xslt>
	</target>
	
	<target name="demo.enote"
		description="build the eNote demo"
		depends="init.demo">
		<mkdir dir="${dita.output.demo.enote.dir}"/>
		<antcall target="dita.enote.html">
			<param name="args.input"
				value="${dita.demo.enote.dir}${file.separator}testnote2.xml"/>
			<param name="inputFile"
				value="${dita.temp.dir}${file.separator}testnote2.xml"/>
			<param name="output.dir"
				value="${dita.output.demo.enote.dir}"/>
			<param name="outputFile"
				value="${dita.output.demo.enote.dir}${file.separator}testnote2.html"/>
		</antcall>
	</target>
				
	<!-- build HTML output for an Email Note topic -->
	<target name="dita.enote.html" depends="dita-preprocess">
		<xslt processor="trax"
				in="${inputFile}"
				out="${outputFile}"
				style="${dita.demo.enote.dir}${file.separator}enote2xhtml_shell.xsl">
			<param name="OUTEXT" expression=".html"/>
			<!--<xmlcatalog refid="dita.catalog"/>-->
		</xslt>
	</target>

	<target name="demo.faq"
		description="build the FAQ demo"
		depends="init.demo">
		<mkdir dir="${dita.output.demo.faq.dir}"/>
		<antcall target="dita.faq.html">
			<!--param name="inputFile"
				value="${basedir}${file.separator}temp${file.separator}DITA-faq.xml"/-->
			<param name="inputFile"
				value="${dita.temp.dir}${file.separator}DITA-faq.xml"/>
			<param name="args.input"
				value="${dita.demo.faq.dir}${file.separator}DITA-faq.xml"/>
			<param name="output.dir"
				value="${dita.output.demo.faq.dir}"/>
			<param name="outputFile"
				value="${dita.output.demo.faq.dir}${file.separator}DITA-faq.html"/>
		</antcall>
		<antcall target="dita.faq.html">
			<!--param name="inputFile"
				value="${basedir}${file.separator}temp${file.separator}ditafaq.xml"/-->
			<param name="inputFile"
				value="${dita.temp.dir}${file.separator}ditafaq.xml"/>
			<param name="args.input"
				value="${dita.demo.faq.dir}${file.separator}ditafaq.xml"/>
			<param name="output.dir"
				value="${dita.output.demo.faq.dir}"/>
			<param name="outputFile"
				value="${dita.output.demo.faq.dir}${file.separator}ditafaq.html"/>
		</antcall>
		<antcall target="demo.faq.generalize"/>
	</target>
	
	<!-- build HTML output for a FAQ topic -->
	<target name="dita.faq.html" depends="dita-preprocess">
		<xslt processor="trax"
				in="${inputFile}"
				out="${outputFile}"
				style="${dita.demo.faq.dir}${file.separator}faq2xhtml_shell.xsl">
			<!--<xmlcatalog refid="dita.catalog"/>-->
		</xslt>
	</target>

	<target name="demo.faq.generalize" depends="init.demo">
		<antcall target="dita.topic.generalize">
			<param name="inputFile"
				value="${dita.demo.faq.dir}${file.separator}ditafaq.xml"/>
			<param name="outputFile"
				value="${dita.output.demo.faq.dir}${file.separator}ditafaq_GENERALIZED.xml"/>
		</antcall>
	</target>
    
	<!-- generalize a specialized topic to the base elements -->
	<target name="dita.topic.generalize">
		<xslt processor="trax"
			in="${inputFile}"
			out="${outputFile}"
			style="${dita.script.dir}${file.separator}generalize.xsl">
			<!--<xmlcatalog refid="dita.catalog"/>-->
		</xslt>
	</target>

	<target name="demo.langref-dita1.1"
		description="build the DITA 1.1 Language Reference book as a demo"
        depends="demo.langref.draftstatus.message">
	</target>

	<target name="demo.langref" depends="demo.langref.draftstatus.message">
	</target>

	<target name="init.demo.langref-dita1.1" depends="demo.langref.draftstatus.message">
		<!--<mkdir dir="${dita.output.demo.langref.dir}"/>-->
	</target>


	<target name="demo.langref-dita1.1.pdf" depends="demo.langref.draftstatus.message">
		<!-- DOST is the project name of imported build.xml-->
		<!--<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.doc.langref.dir}${file.separator}ditaref-book.ditamap"/>
			<param name="output.dir"      value="${dita.output.demo.langref.dir}"/>
      		<param name="transtype" value="pdf"/>
			<param name="dita.extname" value="dita"/>
			<param name="args.fo.img.ext" value=".gif"/>
		</antcall>-->
	</target>

    <target name="demo.langref.draftstatus.message">
      <echo>The language reference demo has been removed for DITA-OT 1.5.2
because it used the DITA 1.1 language reference. The toolkit
now fully supports DITA 1.2; however, the combined DITA 1.2 
specification is very large, and is not bundled with the 1.5.2 
toolkit. For the final version of the standard (including
source, XHTML, PDF, and CHM), see:
http://docs.oasis-open.org/dita/v1.2/spec/DITA1.2-spec.html
</echo>
    </target>

	<target name="demo.langref.pdf" depends="demo.langref.draftstatus.message">
    </target>
	<target name="demo.langref.compilehelp" depends="demo.langref.draftstatus.message">
    </target>
	<target name="doc.langref.web" depends="demo.langref.draftstatus.message">
    </target>
    <target name="doc.langref.chm" depends="demo.langref.draftstatus.message">
    </target>
    <target name="doc.langref.pdf" depends="demo.langref.draftstatus.message">
    </target>

	<target name="demo.langref-dita1.1.compilehelp"
		description="to build the DITA 1.1 Language Reference as HTML Help (not in all)"
		depends="demo.langref.draftstatus.message">
		<!--<antcall target="dita2htmlhelp">
			<param name="args.input"
				value="${dita.doc.langref.dir}${file.separator}ditaref-book.ditamap"/>
			<param name="output.dir"
				value="${dita.output.demo.langrefhelp.dir}"/>
            <param name="transtype" value="htmlhelp"/>
            <param name="dita.extname" value="dita"/>
            <param name="args.ftr" value="${dita.doc.langref.dir}${file.separator}langref-footer.xml"/>
            <param name="args.css" value="${dita.doc.langref.dir}${file.separator}resource${file.separator}dita-oasis.css"/>
            <param name="args.copycss" value="yes"/>
		</antcall>-->
	</target>

	<target name="clean.demo"
		description="remove the demo output">
		<delete dir="${dita.output.demo.dir}"/>
	</target>

	<target name="clean.demo.book"
		description="remove the book demo output">
		<delete dir="${dita.output.demo.book.dir}"/>
	</target>

	<target name="clean.demo.elementref"
		description="remove the Element Reference demo output">
		<delete dir="${dita.output.demo.elementref.dir}"/>
	</target>

	<target name="clean.demo.enote"
		description="remove the eNote demo output">
		<delete dir="${dita.output.demo.enote.dir}"/>
	</target>

	<target name="clean.demo.faq"
		description="remove the FAQ demo output">
		<delete dir="${dita.output.demo.faq.dir}"/>
	</target>

	<target name="clean.demo.langref-dita1.1"
		description="remove the Language Reference demo output">
		<!--<delete dir="${dita.output.demo.langref.dir}"/>-->
	</target>

	<target name="clean.demo.langref-dita1.1.compilehelp"
		description="remove the Language Reference as HTML Help output">
		<!--<delete dir="${dita.output.demo.langrefhelp.dir}"/>-->
	</target>

	<target name="doc"
		description="build the documentation"
		depends="init, doc.articles.web, doc.readme.web, doc.installguide.chm">      
	</target>
	
	<target name="init.doc.langref-dita1.1" depends="demo.langref.draftstatus.message">
		<!--<mkdir dir="${dita.output.doc.langref.dir}"/>-->
	</target>
	
	<target name="doc.langref-dita1.1.web" depends="demo.langref.draftstatus.message"
		description="Build the DITA 1.1 Language Reference.">
		<!--<antcall target="dita2xhtml">
			<param name="args.input"
				value="${dita.doc.langref.dir}${file.separator}ditaref-alpha.ditamap"/>
			<param name="output.dir"     value="${dita.output.doc.langref.dir}"/>
            <param name="args.xhtml.toc" value="toc"/>
            <param name="dita.extname" value="dita"/>
            <param name="transtype" value="xhtml"/>
            <param name="args.ftr" value="${dita.doc.langref.dir}${file.separator}langref-footer.html"/>
            <param name="args.css" value="${dita.doc.langref.dir}${file.separator}resource${file.separator}dita-oasis.css"/>
            <param name="args.copycss" value="yes"/>    
		</antcall>
		<copy todir="${dita.output.doc.langref.dir}"
        file="${dita.doc.langref.dir}${file.separator}resource${file.separator}index.html"/>		    -->
	</target>
    
    <target name="doc.langref-dita1.1.chm" depends="demo.langref.draftstatus.message"
		description="Build the DITA 1.1 langref document to HTML Help.">
		<!--<antcall target="dita2htmlhelp">
			<param name="args.input"
				     value="${dita.doc.langref.dir}${file.separator}ditaref-alpha.ditamap"/>
			<param name="output.dir" value="${dita.output.doc.langref.dir}"/>
            <param name="transtype" value="htmlhelp"/>
            <param name="dita.extname" value="dita"/>
            <param name="args.ftr" value="${dita.doc.langref.dir}${file.separator}langref-footer.html"/>
            <param name="args.css" value="${dita.doc.langref.dir}${file.separator}resource${file.separator}dita-oasis.css"/>
            <param name="args.copycss" value="yes"/>
		</antcall>    -->
	</target>
    
    <target name="doc.langref-dita1.1.pdf" depends="demo.langref.draftstatus.message"
		description="Build the DITA 1.1 langref document to PDF.">
    	<!-- DOST is the project name of imported build.xml-->
		<!--<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.doc.langref.dir}${file.separator}ditaref-alpha.ditamap"/>
			<param name="output.dir"      value="${dita.output.doc.langref.dir}"/>
      		<param name="transtype" value="pdf"/>
			<param name="dita.extname" value="dita"/>
			<param name="args.fo.img.ext" value=".gif"/>
		</antcall>-->
	</target>
	
	<target name="clean.doc.langref-dita1.1"
		description="Delete the langref directory in doc.">
		<!--<delete dir="${dita.output.doc.langref.dir}"></delete>-->
	</target>
	
	<target name="init.doc.articles" depends="init">
		<mkdir dir="${dita.output.doc.articles.dir}"/>
	</target>
	
	<target name="doc.articles.web" depends="init.doc.articles"
		description="Build the articles of dita as document.">
		<antcall target="dita2xhtml">
			<param name="args.input"
				value="${dita.doc.articles.dir}${file.separator}DITA-articles.ditamap"/>
			<param name="output.dir"     value="${dita.output.doc.articles.dir}"/>
      <param name="transtype" value="xhtml"/>
		</antcall>
	</target>
    
    <target name="doc.articles.chm" depends="init.doc.articles"
		description="Build the articles of dita as document.">
		<antcall target="dita2htmlhelp">
			<param name="args.input"
				value="${dita.doc.articles.dir}${file.separator}DITA-articles.ditamap"/>
			<param name="output.dir"     value="${dita.output.doc.articles.dir}"/>
      <param name="transtype" value="htmlhelp"/>
		</antcall>
	</target>
    
    <target name="doc.articles.pdf" depends="init.doc.articles"
		description="Build the articles of dita as document.">
    	<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.doc.articles.dir}${file.separator}DITA-articles.ditamap"/>
			<param name="output.dir"      value="${dita.output.doc.articles.dir}"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>
	
	<target name="clean.doc.articles"
		description="Delete the articles directory in doc.">
		<delete dir="${dita.output.doc.articles.dir}"></delete>
	</target>
	
	<target name="doc.readme.web" depends="init">
		<antcall target="dita2xhtml">
			<param name="args.input"
				value="${dita.doc.dir}${file.separator}readme.ditamap"/>
			<param name="output.dir"     value="${dita.output.doc.dir}"/>
      <param name="transtype" value="xhtml"/>
		</antcall>
	</target>
    
    <target name="doc.readme.chm" depends="init">
		<antcall target="dita2htmlhelp">
			<param name="args.input"
				value="${dita.doc.dir}${file.separator}readme.ditamap"/>
			<param name="output.dir"     value="${dita.output.doc.dir}"/>
      <param name="transtype" value="htmlhelp"/>
		</antcall>
	</target>
    
    <target name="doc.readme.pdf" depends="init">
    	<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.doc.dir}${file.separator}readme.ditamap"/>
			<param name="output.dir"      value="${dita.output.doc.dir}"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>
	
	<target name="doc.installguide.web" depends="init">
		<antcall target="dita2xhtml">
			<param name="args.input"
				value="${dita.doc.dir}${file.separator}ot-userguide${file.separator}DITAOT_UGRef_SOURCE${file.separator}installing${file.separator}installing_map.ditamap"/>
			<param name="output.dir" value="${dita.output.doc.dir}${file.separator}installguide"/>
      <param name="transtype" value="xhtml"/>
		</antcall>
	</target>
    
	<target name="doc.installguide.chm" depends="init">
		<antcall target="dita2htmlhelp">
			<param name="args.input"
				value="${dita.doc.dir}${file.separator}ot-userguide${file.separator}DITAOT_UGRef_SOURCE${file.separator}installing${file.separator}installing_map.ditamap"/>
			<param name="output.dir" value="${dita.output.doc.dir}${file.separator}installguide"/>
      <param name="transtype" value="htmlhelp"/>
		</antcall>
	</target>
  
	<target name="doc.installguide.pdf" depends="init">
		<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.doc.dir}${file.separator}ot-userguide${file.separator}DITAOT_UGRef_SOURCE${file.separator}installing${file.separator}installing_map.ditamap"/>
			<param name="output.dir"      value="${dita.output.doc.dir}${file.separator}installguide"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>
	
	<target name="doc.quickstartguide.chm" depends="init">
		<antcall target="dita2htmlhelp">
			<param name="args.input"
			  value="${dita.doc.dir}${file.separator}quickstartguide.ditamap"/>
			<param name="output.dir" value="${dita.output.doc.dir}"/>
      <param name="transtype" value="htmlhelp"/>
		</antcall>
	</target>
  
	<target name="doc.quickstartguide.pdf" depends="init">
		<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"
			  value="${dita.doc.dir}${file.separator}quickstartguide.ditamap"/>
			<param name="output.dir" value="${dita.output.doc.dir}"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>

	<target name="clean.doc"
		description="remove the documentation output">
		<delete dir="${dita.output.doc.dir}"/>
	</target>

	<target name="samples"
		description="build the sample output"
		depends="samples.web, samples.eclipse, samples.javahelp, samples.htmlhelp, samples.pdf">
	</target>

	<target name="samples.init" depends="init">
		<mkdir dir="${dita.output.samples.dir}"/>
	</target>

	<target name="samples.web"
		description="build the samples for the web"
		depends="samples.init">
		<antcall target="dita2xhtml">
			<param name="args.input"
				value="${dita.samples.dir}${file.separator}hierarchy.ditamap"/>
			<param name="output.dir" value="${dita.output.samples.web.dir}"/>
  		<param name="args.xhtml.toc" value="toc"/>
      <param name="transtype" value="xhtml"/>
		</antcall>
		<copy todir="${dita.output.samples.web.dir}">
			<fileset dir="${dita.resource.dir}"
				includes="index.html"/>
		</copy>
	</target>

	<target name="samples.eclipse"
		description="build the samples for Eclipse"
		depends="samples.init">
		<antcall target="dita2eclipsehelp">
			<param name="args.input"
				value="${dita.samples.dir}${file.separator}hierarchy.ditamap"/>
			<param name="output.dir"     value="${dita.output.samples.eclipse.dir}"/>
      <param name="transtype" value="eclipsehelp"/>
		</antcall>
	</target>

	<target name="samples.javahelp"
		description="build the samples for JavaHelp"
		depends="samples.init">
		<antcall target="dita2javahelp">
			<param name="args.input"
				value="${dita.samples.dir}${file.separator}hierarchy.ditamap"/>
			<param name="output.dir"     value="${dita.output.samples.javahelp.dir}"/>
      <param name="transtype" value="javahelp"/>
		</antcall>
	</target>

	<target name="samples.htmlhelp"
		description="build the samples for HTMLHelp"
		depends="samples.init">
		<antcall target="dita2htmlhelp">
			<param name="args.input"
				value="${dita.samples.dir}${file.separator}hierarchy.ditamap"/>
			<param name="output.dir"
				value="${dita.output.samples.htmlhelp.dir}"/>
      <param name="transtype" value="htmlhelp"/>
		</antcall>
	</target>

	<target name="samples.pdf"
		description="build the samples as PDF"
		depends="samples.init">
		<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"      
				value="${dita.samples.dir}${file.separator}sequence.ditamap"/>
			<param name="output.dir"      value="${dita.output.samples.pdf.dir}"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>
	
	<target name="docbook"
		description="transform the samples to DocBook"
		depends="init">
		<mkdir dir="${dita.output.docbook.dir}"/>

		<antcall target="dita2docbook">
			<param name="args.input"  
				value="${dita.samples.dir}${file.separator}hierarchy.ditamap"/>
			<param name="output.dir" value="${dita.output.docbook.dir}"/>
      <param name="transtype" value="docbook"/>
		</antcall>

		<antcall target="dita2docbook">
			<param name="args.input"
				value="${dita.doc.dir}${file.separator}readme${file.separator}DITA-readme.xml"/>
			<param name="output.dir"
				value="${dita.output.docbook.dir}"/>
      <param name="transtype" value="docbook"/>
		</antcall>
	</target>
	
	<target name="clean.docbook"
		description="remove the docbook output">
		<delete dir="${dita.output.docbook.dir}"/>
	</target>	

	<target name="clean.samples"
		description="remove the sample output">
		<delete dir="${dita.output.samples.dir}"/>
	</target>

	<target name="clean.samples.web"
		description="remove the sample web output">
		<delete dir="${dita.output.samples.web.dir}"/>
	</target>

	<target name="clean.samples.eclipse"
		description="remove the sample Eclipse output">
		<delete dir="${dita.output.samples.eclipse.dir}"/>
	</target>

	<target name="clean.samples.javahelp"
		description="remove the sample JavaHelp output">
		<delete dir="${dita.output.samples.javahelp.dir}"/>
	</target>

	<target name="clean.samples.htmlhelp"
		description="remove the sample HTMLHelp output">
		<delete dir="${dita.output.samples.htmlhelp.dir}"/>
	</target>

	<target name="clean.samples.pdf"
		description="remove the sample PDF output">
		<delete dir="${dita.output.samples.pdf.dir}"/>
	</target>
    
	<!-- prompting target -->
	<target name="prompt"
		description="prompt to build anything"
		depends="prompt.init">
		<!-- The prompt strings should be externalized in a properties file 
	     so they can be localized. -->
		<echo>Please enter the filename for the DITA map that you 
want to build including the directory path (if any).
The filename must have the .ditamap extension.
Note that relative paths that climb (..) are not supported yet.
To build the sample, press return without entering anything.</echo>
		<input message="The DITA map filename: "
			addproperty="prompt.ditamap.filename"
			defaultvalue="${dita.samples.dir}${file.separator}hierarchy.ditamap"/>
		<fail message="no map entered">
			<condition>
				<or>
					<not><isset property="prompt.ditamap.filename"/></not>
					<equals arg1="${prompt.ditamap.filename}" arg2=""/>
				</or>
			</condition>
		</fail>
		<fail message="cannot find ${prompt.ditamap.filename}">
			<condition>
				<not><available file="${prompt.ditamap.filename}"/></not>
			</condition>
		</fail>
		<basename property="prompt.ditamap.fileroot"
			file="${prompt.ditamap.filename}" suffix=".ditamap"/>
		<dirname property="prompt.ditamap.directory"
			file="${prompt.ditamap.filename}"/>
		<echo>
Please enter the name of the output directory or press return
to accept the default.</echo>
		<input message="The output directory (out): "
			addproperty="prompt.output.directory"
			defaultvalue="out"/>
		<echo>
Please enter the type of output to generate.
Options include: eclipse, htmlhelp, javahelp, pdf, or web
Use lowercase letters.
		</echo>
		<input message="The output type: "
			addproperty="prompt.output.type"
			validargs="eclipse,htmlhelp,javahelp,pdf,web,docbook"
			defaultvalue="web"/>
		<condition property="isEclipseOutput">
			<equals arg1="${prompt.output.type}" arg2="eclipse"/>
		</condition>
		<condition property="isHtmlHelpOutput">
			<equals arg1="${prompt.output.type}" arg2="htmlhelp"/>
		</condition>
		<condition property="isJavaHelpOutput">
			<equals arg1="${prompt.output.type}" arg2="javahelp"/>
		</condition>
		<condition property="isPDFOutput">
			<equals arg1="${prompt.output.type}" arg2="pdf"/>
		</condition>
		<condition property="isWebOutput">
			<equals arg1="${prompt.output.type}" arg2="web"/>
		</condition>
		<condition property="isDocbookOutput">
			<equals arg1="${prompt.output.type}" arg2="docbook"/>
		</condition>
		<echo>
Ready to build ${prompt.ditamap.filename}
for ${prompt.output.type} in ${prompt.output.directory}
		</echo>
		<input message="Continue? "
			addproperty="prompt.output.confirm"
			validargs="Y,y,N,n"
			defaultvalue="y"/>
		<fail message="not building">
			<condition>
				<or>
					<equals arg1="${prompt.output.confirm}" arg2="N"/>
					<equals arg1="${prompt.output.confirm}" arg2="n"/>
				</or>
			</condition>
		</fail>
		<antcall target="prompt.output"/>
	    <echo>
output in the ${prompt.output.directory} directory
    		
Before rebuilding, please delete the output or the directory.</echo>
	</target>

	<target name="prompt.init">
		<!-- Create the time stamp -->
		<tstamp/>
	</target>

	<target name="prompt.output.init" depends="init">
		<mkdir dir="${prompt.output.directory}"/>
	</target>

	<target name="prompt.output"
		depends="prompt.output.eclipse, prompt.output.javahelp, prompt.output.htmlhelp, prompt.output.pdf, prompt.output.web, prompt.output.docbook"/>

	<target name="prompt.output.web" depends="prompt.output.init"
		if="isWebOutput">			
		<copy todir="${prompt.output.directory}">
			<fileset dir="${dita.resource.dir}"
				includes="index.html"/>
		</copy>
		<antcall target="dita2xhtml">
			<param name="args.input"      value="${prompt.ditamap.filename}"/>
			<param name="output.dir"     value="${prompt.output.directory}"/>
			<param name="args.xhtml.toc" value="toc"/>
			<param name="dita.temp.dir" value="temp"/>
      <param name="transtype" value="xhtml"/>
		</antcall>
	</target>

	<target name="prompt.output.eclipse" depends="prompt.output.init"
		if="isEclipseOutput">
		<antcall target="dita2eclipsehelp">
			<param name="args.input"      value="${prompt.ditamap.filename}"/>
			<param name="output.dir"     value="${prompt.output.directory}"/>
			<param name="args.eclipse.toc" value="toc"/>
			<param name="dita.temp.dir" value="temp"/>
      <param name="transtype" value="eclipsehelp"/>
		</antcall>
	</target>

	<target name="prompt.output.javahelp" depends="prompt.output.init"
		if="isJavaHelpOutput">
		<antcall target="dita2javahelp">
			<param name="args.input"      value="${prompt.ditamap.filename}"/>
			<param name="output.dir"     value="${prompt.output.directory}"/>
			<param name="args.javahelp.toc" value="toc"/>
			<param name="args.javahelp.map" value="map"/>
			<param name="dita.temp.dir" value="temp"/>
      <param name="transtype" value="javahelp"/>
		</antcall>
	</target>

	<target name="prompt.output.htmlhelp" depends="prompt.output.init"
		if="isHtmlHelpOutput">
		<antcall target="dita2htmlhelp">
			<param name="args.input"
				value="${prompt.ditamap.filename}"/>
			<param name="output.dir"
				value="${prompt.output.directory}"/>
			<param name="dita.temp.dir" value="temp"/>
      <param name="transtype" value="htmlhelp"/>
		</antcall>
	</target>

	<target name="prompt.output.pdf" depends="prompt.output.init"
		if="isPDFOutput">
		<!-- DOST is the project name of imported build.xml-->
		<antcall target="DOST.init">
			<param name="args.input"      
				value="${prompt.ditamap.filename}"/>
			<param name="output.dir"      value="${prompt.output.directory}"/>
			<param name="dita.temp.dir" value="temp"/>
      		<param name="transtype" value="pdf"/>
		</antcall>
	</target>

	<target name="prompt.output.docbook" depends="prompt.output.init"
		if="isDocbookOutput">
		<antcall target="dita2docbook">
			<param name="args.input"       value="${prompt.ditamap.filename}"/>
			<param name="output.dir"      value="${prompt.output.directory}"/>
			<param name="dita.temp.dir" value="temp"/>
      <param name="transtype" value="docbook"/>
		</antcall>
	</target>
  
 	<target name="samples.troff"
  			description="test dita to troff"
  			depends="samples.init">
  		<antcall target="dita2troff">
  			<param name="args.input"       
  				value="${dita.samples.dir}${file.separator}concepts${file.separator}oil.xml"/>
  			<param name="output.dir" value="${dita.output.samples.troff.dir}"/>
  			<param name="dita.temp.dir" value="temp"/>
        <param name="transtype" value="troff"/>
  		</antcall>
  	</target>
	
  <!-- The whole process on which javamerge depends equals to the target "dita-process" in build.xml. -->
  <target name="javamerge"  description="Merge topics" depends="start-process, init-logger, check-arg, output-deprecated-msg, output-css-warn-message, preprocess">
	<basename property="temp.base" file="${user.input.file}" suffix=".ditamap"/>
    <property name="temp.input" value="${dita.temp.dir}${file.separator}${user.input.file}"/>
    <property name="temp.output" value="${output.dir}${file.separator}${user.input.file}"/>
    <dirname property="temp.dir" file="${temp.input}"/>
    <dirname property="temp.outdir" file="${temp.output}"/>
    <pipeline message="topicmerge" module="TopicMerge" 
      inputmap="${temp.dir}${file.separator}${temp.base}.ditamap" 
      tempdir="${dita.temp.dir}">
      <param name="output" location="${temp.outdir}${file.separator}${temp.base}_merged.xml"/>
    </pipeline>
  </target>
	
</project>