<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="concept_introduction"> 
  <title>Introducing Document Generation</title> 
  <shortdesc>Learning the mechanics of document generation with DITA OT.</shortdesc> 
  <conbody>
  <p>Your documentation project uses an Ant build script, which calls a target in another Ant build script in the DITA-OT
  root directory, which imports another Ant build script, which itself imports several more Ant build scripts.
  Sound confusing?  This topic explains this interaction and explains how to identify targets in these scripts related to 
  errors in your document generation.</p>
  <p>Each target in the build script for this Quick Start Guide contains the following code snippet.
      <codeblock>&lt;ant antfile="${dita.dir}/build.xml" target="init"></codeblock> The
        <codeph>toolkit_dir</codeph> directory is the root directory where you installed
      DITA-OT.</p>
  <p>The build file you should understand is <codeph>build.xml</codeph>, located in folder bound to
        <codeph>dita.dir</codeph> property. The Ant targets defined and imported into this script
      are the same targets that you see on the console as your build script runs.</p>
  <table>
  <tgroup cols="2">
  <colspec colname="COLSPEC10" colwidth="150*"/>
  <colspec colname="COLSPEC11" colwidth="250*"/>
  <thead>
  <row>
	<entry colname="COLSPEC10" valign="top">DITA-OT Build Script</entry>
	<entry colname="COLSPEC11" valign="top">Description</entry>
  </row>
  </thead>
  <tbody>
  <row>
	<entry><codeph>build_init.xml</codeph></entry>
	<entry>Starts the document transformation, initializes the DITA-OT logger, verifies that the
              toolkit can locate the files and directories that you specified in your build file,
              and prints these values to the console and the log file, if you have specified
              one.</entry>
  </row>
  <row>
	<entry><codeph>build_preprocess.xml</codeph></entry>
	<entry>Validates your content files, generates lists of input files, including internal elements distributed across all content, such as index and 
	    conref entries.  Moves copies of these files and elements into the the directory specified by <codeph>output.dir</codeph> property
		in your build script.</entry>
  </row>
  <row>
	<entry><codeph>build_general.xml</codeph>, <codeph>build_dita2wordrtf.xml</codeph>,
                <codeph>build_dita2xhtml.xml</codeph>, <codeph>build_dita2eclipsehelp.xml</codeph>,
              <codeph>build_dita2javahelp.xml</codeph>, <codeph>build_dita2htmlhelp.xml</codeph>,
                <codeph>build_dita2pdf</codeph></entry>
	<entry>Output specific Ant files which are not intended to be run directly.</entry>
  </row>	
  </tbody>
  </tgroup>
  </table>
	<p>Your console displays the name of each Ant target called inside the build scripts, including the
      output-specific script. For example, the following screen shot displays the names of Ant
      targets contained in the <codeph>build.xml</codeph> script when PDF transtformation type is
      used.</p>
	<p><image href="../images/pdftargets.gif" height="350" width="500" align="center"/></p>
	<p>When you see an error in the output, you should read the Ant target that generated it for clues to solve the problem.
	To learn more about what caused the <codeph>INFO</codeph>, <codeph>SEVERE</codeph>, and <codeph>WARNING</codeph> errors in the image above,
	you should read the <codeph>transform.fo2pdf.fop</codeph> Ant target to learn what the Toolkit was doing when the error occurred and which
	xsl file generated the error.</p>
	<note>The DITA-OT build scripts sometimes continue to run even if they are unable to generate a temporary file for 
	one of your content files.  The build later displays an error message stating that a DITA-OT build script cannot find a generated file.  This
	error is often misleading; the problem may be that your content file contains an error other than XML validation, which would stop the DITA-OT
	build from proceeding.</note>
	<p>DITA-OT uses a separate set of Ant targets to process your PDF if you specify a value for the
        <codeph>args.fo.userconfig</codeph> property in your document's build script.</p>
  </conbody>
</concept>