<?xml version="1.0" encoding="UTF-8"?>
<!--Arbortext, Inc., 1988-2010, v.4002-->
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
 "task.dtd">
<?Pub Sty _display FontColor="red"?>
<task id="about_generatingdocuments" xml:lang="en-us">
<title>Generating Documents with Ant</title>
<shortdesc>How to generate documents from the command line with Ant.    </shortdesc>
<taskbody>
    <steps>
      <step>
        <cmd>Open a command prompt. </cmd>
      </step>
      <step>
        <cmd>Change directories to where the DITA-OT is installed on your machine. </cmd>
      </step>
      <step>
        <cmd>Set up the processing environment.</cmd>
        <info>Enter the following command:<codeblock>startcmd.bat</codeblock></info>
        <stepresult><p>Another command prompt appears with DITA-OT in the title bar, as shown in the
        following figure:</p>
          <image align="center" href="../images/DITA-OTCommandPrompt.gif"/>
        </stepresult>
      </step>
      <step>
        <cmd>Run a convertion to a transformation output type.</cmd>
        <info>Enter the following command and press the Enter
            key:<codeblock>ant -Dargs.input=<userinput>source</userinput> -Dtranstype=<userinput>transtype</userinput></codeblock><p>The
            following table describes this command.</p>
          <simpletable>
              <sthead>
                  <stentry>Syntax </stentry>
                  <stentry>Description </stentry>
              </sthead>
                <strow>
                  <stentry><codeph>ant</codeph>
                  </stentry>
                  <stentry>Starts the Ant build tool installed as part of DITA-OT.
                  </stentry>
                </strow>
                <strow>
                  <stentry><codeph>-Dargs.input=<userinput>source</userinput></codeph>
                  </stentry>
                  <stentry>The <userinput>source</userinput> specifies the DITA topic
                    or map to process. If the build file is not in the current directory, you must
                    specify the path to the file.</stentry>
                </strow>
                <strow>
                  <stentry
                    ><codeph>-Dtranstype=<userinput>format</userinput></codeph></stentry>
                  <stentry>The <userinput>format</userinput> specifies the
                    transformation output type to generate.</stentry>
                </strow>
          </simpletable></info>
        <stepxmp>
          <p>To build XHTML output for the sample DITA map
              <filepath>samples\hierarchy.ditamap</filepath>, run the command:</p>
          <codeblock>ant -Dargs.input=samples\hierarchy.ditamap -Dtranstype=xhtml</codeblock>
        </stepxmp>
        <stepresult>
          <p>DITA-OT displays a lot of output in the console window, including whether the build
            failed or succeeded at the end of the output. </p>
          <image href="../images/CommandPromptOutputSuccess2.gif">
              <alt>DITA-OT Build Success Message </alt>
            </image>
          <?Pub Caret 1?>
          <p>When your build is unsuccessful, the error message may be difficult to find in the
            copious output. If you have not configured your console window most of the early output
            may have already scrolled off the screen. If you add an Ant property, <codeph>-l
                <userinput>log-file</userinput></codeph> to the command line invocation, DITA-OT
            will save the output to a log file that you can study after the build finishes.</p>
        </stepresult>
      </step>
    </steps>
  </taskbody>
</task>
<?Pub *0000003534?>
