VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/docsrc/readme/DITA-antscript.xml@ 99012

Last change on this file since 99012 was 98584, checked in by vboxsync, 2 years ago

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--Arbortext, Inc., 1988-2010, v.4002-->
3<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
4 "..\dtd\reference.dtd">
5<?Pub Sty _display FontColor="red"?>
6<?Pub Inc?>
7<reference id="antscript" xml:lang="en-us">
8<title>Ant tasks and scripts</title>
9<shortdesc>This topic describes detailed Ant tasks and scripts.</shortdesc>
10<refbody>
11<section><p>The build process including pre-process can be called by using an Ant script. The most important
12 Ant scrip file is called <filepath>build.xml</filepath>, it defines and combines common
13 pre-processing and output transformation routines, as well as extension points that allow
14 DITA-OT Plug-ins to add to this common processing.</p></section>
15<section> <title>Sample ant script</title> <p>These ant scripts are in <filepath>samples/ant_sample</filepath> directory. They are
16 simple and easy to learn. From these files, you can learn how to write your own Ant script
17 to build your own process.</p> <p>Here is a sample template for writing an Ant script that executes transformation to XHTML
18 in <filepath>samples/ant_samples</filepath>
19 directory:<codeblock>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
20&lt;project name="@PROJECT.NAME@_xhtml" default="@DELIVERABLE.NAME@2xhtml" basedir=".">
21
22 &lt;property name="dita.dir" location="${basedir}/../.."/>
23
24 &lt;target name="@DELIVERABLE.NAME@2xhtml">
25 &lt;ant antfile="${dita.dir}${file.separator}build.xml">
26 &lt;!-- please refer to the toolkit's document for supported parameters, and
27 specify them base on your needs -->
28 &lt;property name="args.input" location="@DITA.INPUT@"/>
29 &lt;property name="output.dir" location="@OUTPUT.DIR@"/>
30 &lt;property name="transtype" value="xhtml"/>
31 &lt;/ant>
32 &lt;/target>
33
34&lt;/project></codeblock></p><p>To use this template, modify the following
35items:<ul>
36<li>Replace <codeph>@PROJECT.NAME@</codeph> with the name of your
37project, such as "MyDocs".</li>
38<li>Replace <codeph>@DELIVERABLE.NAME@</codeph> with the name of your
39deliverable, such as "installDocs".</li>
40<li>Replace <codeph>@DITA.INPUT@</codeph> with the name of your input
41file (using either a full path or a relative path from the location
42of this template).</li>
43<li>Replace <codeph>@OUTPUT.DIR@</codeph> with the desired output
44directory (using either a full path or a relative path from the location
45of this template).</li>
46</ul></p><p>Once you have updated these items, you can run your build
47with the following command:<codeblock>ant -f samples/ant_sample/template_xhtml.xml</codeblock></p><p>The build will convert your input file to XHTML. Note that the build directly calls the Ant
48 script <filepath>build.xml</filepath>, which is a common entry point for DITA-OT builds; it
49 in turn imports all of the scripts mentioned above.</p></section>
50</refbody>
51 <related-links>
52 <link href="dita-ot_ant_properties.dita"/>
53 </related-links>
54</reference>
55<?Pub *0000024648?>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette