Add a new preprocessor

Once you have created the transformation target, you define a new preprocessor for this target.

New preprocessors are defined in the %OutputGenDir%/conf/client/preprocessors.xml file in a <preprocessor> element, as shown below:
<preprocessor name="PDF" 
              class="com.ixiasoft.outputgenerator.preprocessor.AntProcessor" >
   <parameters>
      <system>
         <parameter name="buildfile" value="/conductor-client.xml"/>
         <parameter name="target" value="acme.dita2pdfwrapper"/>
         <parameter name="clean" value="job_postprocess"/>
         <parameter name="keep.log.files" value="true"/>
      </system>
      <user>
          <parameter name="param1" value="value1"/>
      </user>
   </parameters>
</preprocessor>
For each preprocessor, you define the following information:
Table 1. Preprocessor definition
Field Description
name attribute Name of the preprocessor.
class attribute Class to execute when calling this preprocessor. Enter com.ixiasoft.outputgenerator.preprocessor.AntProcessor.
<system> parameters System parameters for executing the target associated with this preprocessor. Specify the following parameters:
buildfile Name of the conductor file that contains the target to execute for this preprocessor. Specify a path relative to the %OutputGenDir%/data directory (for example, /conductor-client.xml).
target Name of the target to execute. This target must exist in the file specified with the buildfile parameter.
clean Name of the target that cleans up the %OutputGenDir%/temp directory after the job is executed. Set this parameter to job_postprocess to use the default job_postprocess target provided with the IXIASOFT CCMS Output Generator. If you created your own clean target, specify that target name instead.
keep.log.files (optional) Specifies whether to return the transformation logs (from the IXIASOFT CCMS Output Generator and DITA Open Toolkit) to the output .zip file (true) or not (false). Default value is true.
support.ditaval (optional) Specifies whether to display the Ditaval selection option and browse button () in the Generate Output dialog. By default, Ditaval selection is enabled. To disable it, set this parameter to false.
<cust_sys_param> (optional) You can add your own system parameters to set values that will be used in your transformation scenario. For example, you could set a watermark parameter to indicate whether to include a watermark in your output.
<user> parameters Add user parameters to the IXIASOFT CCMS Output Generator dialog box.

To define a new preprocessor:

  1. Open the %OutputGenDir%/conf/client/preprocessors.xml file.
    Note: If this is the first time that you are modifying the preprocessors.xml file, open the preprocessors.xml.orig file and save it as preprocessors.xml (remove the .orig suffix).
    Important: Do not update the preprocessors.xml file that is in the conf directory; always update the file in the conf/client directory. This separation ensures that your customization does not get overwritten when you update the IXIASOFT CCMS Output Generator.

    When a preprocessor is invoked, the IXIASOFT CCMS Output Generator looks first for the preprocessors defined in the conf/ directory and then adds any additional preprocessors that it finds in the conf/client directory. If you define a preprocessor with the same name as a preprocessor defined in conf/preprocessors.xml, the preprocessor in conf/client overrides that in conf.

  2. Under the <preprocessors> element, define a new preprocessor name and class:

    For example, the following code shows how to create a preprocessor for the acme.dita2xHtmlwrapper" target, which allows users to generate HTML output:

    <preprocessors>
       <preprocessor name="acme.dita2xHTML" 
        class="com.ixiasoft.outputgenerator.preprocessor.AntProcessor">
  3. Create a <parameters> and a <system> element. Then create a <parameter> element and specify the conductor file:

    For example:

    <parameter name="buildfile" value="/conductor-acme.xml" />           
  4. Specify the target to execute in the conductor file:

    This target contains the Ant code that will execute the HTML transformation scenario. For example:

    <parameter name="target" value="acme.dita2xHtmlwrapper" />
  5. Specify the target to execute to clean the job directory (job.dir) of the current output:

    For example, to use the job_postprocess target provided by the CCMS (which deletes the job.dir directory), add the following line:

    <parameter name="clean" value="job_postprocess" />
  6. To package the log files with the output file, add the following line:
    <parameter name="keep.log.files" value="true"/>
  7. If required, enter custom system parameters.
    For example:
    <parameter name="watermark" value="yes"/>
  8. If required, enter <user> parameters to display in the Generate Output dialog.
    The final preprocessor definition should be similar to the following; note that no user parameters are provided for this preprocessor.
    <preprocessors>
       <preprocessor name="acme.dita2xHTML" class="com.ixiasoft.outputgenerator.preprocessor.AntProcessor">
          <parameters>
             <system>
                <parameter name="buildfile" value="/conductor-acme.xml" />  
                <parameter name="target" value="acme.dita2xHtmlwrapper" />
                <parameter name="clean" value="job_postprocess" /> 
                <parameter name="keep.log.files" value="true"/>
                <parameter name="watermark" value="yes"/>
             </system>      
          </parameters>
       </preprocessor> 
    </preprocessors>
    Save and close preprocessors.xml.
  9. Restart the IXIASOFT CCMS Output Generator service to apply your changes.