IPublishPostProcessPlugin - IshRunDITAOT
Runs the DITA-OT transformation process by executing the ishrunditaot.cmd command. If files were changed in the DITA-OT or Doctypes folders, the command ant -f integrator is executed beforehand to rebuild the files needed by DITA-OT.
Plugin Input
Plugin configuration parameters
| Parameter | Required | Default value | Allowed values | Description |
|---|---|---|---|---|
| DITAOTParentFolder | Yes | Valid folder path. | The path to the parent folder of the DITA-OT folder. Most of the time this is "%ISHPROJECTAPPPATH%\Utilities". | |
| DITAOTOutDirectoryContextItemKey | Yes | The name of key of output parameter to set the full directory name of the out directory generated by DITA-OT | The output value with the full directory name of the out directory generated by DITA-OT will be added to the context.Items collection.
| |
| CopyImagesAndOtherFilesToOutputFolder | No | yes | Boolean | Indicate whether the plugin should copy all Image and Other type of objects to the DITA-OT output folder |
| StoreEntireDITAOTLogFile | No | no | Boolean. | Indicates whether to store the entire DITA-OT log file for a successful publish in the event logging. If false only the last 1000 lines will be stored. For a failed publish all log lines are always stored. |
| BuildDITAOTFiles | No | yes | Boolean. | Indicates whether whether DITA-OT build files need to be regenerated or not. |
| AntHomeFolder | No | Valid folder path. | The path to ANT_HOME folder.
| |
| NumberOfDITAOTLines | No | 1000 | Number. | Indicates number of lines for logging. |
Input expected in the context.Items collection: None
Plugin Outcome
Changes made to the file system: Unknown, as the external process can be anything.
Values set in the context as a result: None.
Values set in the
context.Items collection as a result:
| Item Key | Typical Value | Item Value Type | Description |
|---|---|---|---|
The name of key is specified in the parameter DITAOTOutDirectoryContextItemKey | string | The out folder of DITA-OT |
plugin name="ISHRUNDITAOT" example
<plugin name="ISHRUNDITAOT" handler="IshRunDITAOT">
<description>
Runs the DITA-OT transformation process by executing the "ishrunditaot.cmd" command.
If files were changed in the DITA-OT or Doctypes folders, the command "ant -f integrator" is executed beforehand to rebuild the files needed by DITA-OT.</description>
<initialize>
<parameters>
<parameter name="DITAOTOutDirectoryContextItemKey">DITAOTOutDirectory</parameter>
<parameter name="DITAOTParentFolder">%ISHPROJECTAPPPATH%\Utilities</parameter>
<parameter name="NumberOfDITAOTLines">1000</parameter>
</parameters>
</initialize>
</plugin>
Plugin flow
The IshRunDITAOT does the following:
- If
BuildDITAOTFiles=yes- checks if files are changed in the DITA-OT or Doctypes folder by calculating checksums for the files in those folders and comparing them to the checksum files of the previous publish. The previous checksums are stored in the DITA-OT\<styleprocessor> folder.
- If one of the files has changed, the command ant -f integrator is executed to rebuild the build files needed by DITA-OT
- Creates the out, temp and log folders below the language folder available in the
publishpostprocesscontextpassed to the plugin - If
CopyImagesAndOtherFilesToOutputFolder=yes- reads the filenames of the
ImageandOthertype objects and copies the files to the out folder
- reads the filenames of the
- Starts a process that executes the
ishrunditaot.cmdcommand with the correct set of parameters (including the location of the DITA Map file, the output directory, temp directory, log filename, etc.) - The output of the process and the DITA OT logfiles are gathered, parsed and saved in the Event Log detail records. The status of the output is set depending whether errors/warning were encountered or not.
- The values of the
contextthat need to be changed are set.