Create a transformation target
This procedure describes how to create a transformation target and add it to a conductor file.
Targets are defined in your client conductor file (for example,
%OutputGenDir%/data/conductor-acme.xml) in a
<target>
element.
- Prepare the execution environment
- Prepare the content for the transformation
- Create the build script
- Run the build script
- Clean up the files
- Input directory: When the IXIASOFT Output Generator retrieves the files from the Content Store, it
stores them in this directory, defined with the
outgen.job.source.dir
Ant property. If you need to modify the files before transforming them, you need to modify them in this directory.Note: If you are working with a branched map, you must call theflatten
target before modifying the source files. Theflatten
target will copy all the working and published files to the input directory so that you can modify them as required. - Output directory: Any file that is stored in this directory at the end of the transformation job will be returned to the end user in a zip file. This directory is defined with the outgen.job.output.dir property. Make sure to clean up your directory as required and to keep all the files that must be returned to the user.
The following procedure describes how to create the acme.dita2xHtmlwrapper
target, which transforms DITA files
into HTML. The final target will look as follows:
<target name="acme.dita2xHtmlwrapper" depends="default_dependencies, flatten, extract_LowRes_images">
<property name="outgen.job.build.filename"
location="${outgen.job.dir}/build.xml"/>
<property name="outgen.job.build.template.filename"
location="${outgen.resources.dir}/job-build-template.xml"/>
<property name="outgen.job.build.otlog.filename"
location="${outgen.job.ot.log.dir}/${outgen.job.source.name.noext}.ot.log"/>
<antcall target="ot_build_create"/>
<antcall target="ot_build_add_ditaval_ifpresent"/>
<antcall target="ot_build_clean_ot_temp"/>
<update-ot-build-file buildfile="${outgen.job.build.filename}">
<param name="transtype" value="xhtml"/>
</update-ot-build-file>
<antcall target="dita_startcmd_ot_build"/>
<antcall target="clean_ot_output"/>
</target>
Since conductor files are like programming files, each target is different and does not follow a specific structure, like output type or processor files do. This section describes how to create a target that transforms DITA files to HTML using the DITA Open Toolkit, but you can create many different types of targets.
To create a transformation target: