About targets and conductor files
The IXIASOFT CCMS Output Generator build files, also called the conductor files, contain the Apache Ant targets that direct the final output processing.
A conductor file is a standard Ant build file that contains one project and at least one target.
Note: This procedure assumes that
you have some knowledge in programming Ant scripts. For basic information on Ant
projects, targets, and tasks, see the Apache Ant Manual at the following URL: http://ant.apache.org/manual/using.html#projects
Structure of conductor files
The conductor files follow the structure shown below:
- One
<project>
element, which provides the project name, default target, and base directory. The<project>
attributes are as follows for a conductor file:name
: Specify the file name without the extension.default
: Keep the value specified in the template (default=""
)basedir
: Keep the value specified in the template (basedir="."
)
Note: In this document, projects are called conductors. - A
<property>
element to set the version of the DITA Open Toolkit used by the targets in this conductor file. All the targets in the conductor file will use the version of the DITA-OT specified at the top of the file. If none is specified, the targets use the default version of the DITA-OT specified in outgen-init.properties. - An
<import>
element to import the outgen-init.xml file, which contains the CCMS Output Generator global properties and imports the targets. - One or more
<target>
elements, which contain the tasks to execute for the transformation.
Adding targets
You create transformation scenarios by adding targets to a conductor file. The following code shows a very simple target, the Export target, which copies files to another directory:
<target name="export" depends="default_dependencies">
<echostart>export</echostart>
<!-- Copy source files to output directory -->
<copydir src="${outgen.job.dir}/content" dest="${outgen.job.output.dir}/content"/>
<if>
<isset property="outgen.job.ditaval.filename"/>
<then>
<copy file="${outgen.job.ditaval.filename}" todir="${outgen.job.output.dir}"/>
</then>
</if>
<echoend>export</echoend>
</target>
Targets include one or more Ant tasks, which are small pieces of code that can be executed. They can be Ant built-in tasks, IXIASOFT CCMS tasks, or your own custom tasks. For example, the export target above uses the <copydir>
Ant built-in task.
You can also use properties in your targets. Again, these can be Ant built-in properties, CCMS properties, or your own properties. Property values are accessed as follows:
${property}
For example, the export target above accesses the outgen.job.dir
and outgen.job.output.dir
properties.A target can execute other targets. It can also depend on other targets for its execution.
Conductor files included in IXIASOFT CCMS
IXIASOFT CCMS provides targets for the five main transformation scenarios as well as many utility targets to help you create your own transformation scenarios. They are stored in the conductor files located in the %OutputGenDir%/data directory:
- conductor-ot.xml: This is the main conductor file for the default DITA-OT transformations. This conductor file provides the targets for the main transformation scenarios that are visible to end users and based on the DITA Open Toolkit conductor file. Targets in this file can be used with DITA-OT 2.x and 3.x. Do not modify this file.
- conductor-ot-1x.xml: This is the legacy conductor file for the default DITA-OT transformations. This conductor file provides the targets for the main transformation scenarios that are visible to end users and based on the DITA Open Toolkit1.x conductor file. Targets in this file are for use with DITA-OT 1.x only. Do not modify this file.
- conductor-ixia.xml: This conductor file provides the targets for the system transformation scenarios (for example, to create review PDFs). Do not modify this file.
- conductor-ixia-cr.xml: This conductor file provides the targets for the collaborative review system transformation scenario. Do not modify this file.
- conductor-bmanifest.xml: This conductor file provides the targets for the Build Manifest transformation scenarios. Do not modify this file.
- conductor-client.xml.orig: Use this template to create the conductor file that will contain the targets for your transformation scenarios. Rename the file with your company name (for example, conductor-acme.xml or conductor-client.xml), and create your targets in this file. You can create as many conductor files as you need. Conductor files must be stored directly in the %OutputGenDir%/data directory.