Specify conditions using a Ditaval file

By default, if at least one Ditaval file exists in the Content Store, the Ditaval option appears in the Generate Output dialog.

To implement Ditaval files in your deployment, make sure that your DITA Open Toolkit transformation handles Ditaval files to generate output. Otherwise, filtering will not be applied.

You must also set the Ditaval file name in the build.xml file by calling the ot_build_add_ditaval_ifpresent target in the transformation scenario target. The ot_build_add_ditaval_ifpresent sets the args.filter parameter in the build.xml file.

To specify conditions using Ditaval:

  1. Open the conductor file (for example, %OutputGenDir%/data/conductor-acme.xml) with a text editor.
  2. Find the applicable target.
  3. Add the following code to your target:
    <antcall target="ot_build_add_ditaval_ifpresent"/>
    For example:
    <target name="acme.dita2pdfwrapper" depends="default_dependencies, flatten, resolve_container_keyref, extract_HiRes_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_pdfrenderer"/>
       <antcall target="ot_build_add_ditaval_ifpresent"/>
    
       <antcall target="ot_build_clean_ot_temp"/>
       <antcall target="ot_build_keep_topicfo"/>
    
       <update-ot-build-file buildfile="${outgen.job.build.filename}">
          <param name="transtype" value="pdf2"/>
          <param name="args.rellinks" value="nofamily"/>
          <param name="args.draft" value="yes"/>
       </update-ot-build-file>
    
       <antcall target="dita_startcmd_ot_build"/>
    
    </target>
     
  4. Save and close the conductor file.