Debugging DITA PDF Transformations
To debug a DITA PDF transformation scenario, follow these steps:
- Open the Preferences dialog box , go to , click Add, and select the file located at DITA-OT-DIR\plugins\org.dita.pdf2\cfg\catalog.xml.
- Open the map in the DITA Maps Manager and create a DITA Map PDF - based on XSL-FO transformation scenario.
- Edit the scenario, go to the Parameters tab and change the value of the clean.temp parameter to no.
- Run the transformation scenario.
- Open the stage1.xml file located in the temporary directory and format and indent it.
-
Create a transformation scenario for this XML file by associating the
topic2fo_shell_fop.xsl stylesheet located at DITA-OT-DIR\plugins\org.dita.pdf2\xsl\fo\topic2fo_shell_fop.xsl. If you are
specifically using the RenderX XEP or Antenna House FO processors to build the PDF output,
you should use the XSL stylesheets topic2fo_shell_xep.xsl or
topic2fo_shell_axf.xsl located in the same folder.
Note: For validation purposes, you need to add the main debugged stylesheet (usually topic2fo_shell_fop.xsl) to the Main Files folder in the Project view.
- In the transformer drop-down menu, select the Saxon EE XSLT processor (the same processor used when the DITA-OT transformation is executed).
-
Click the Parameters button and set the
localeparameter with the valueen_GBand thecustomizationDir.urlparameter to point either to your customization directory or to the default DITA-OT customization directory. Its value should have a URL syntax like this:file://c:/path/to/DITA-OT-DIR/plugins/org.dita.pdf2/cfg. -
If your XSLT stylesheet uses Java extensions, you need to reference the extra JAR
libraries by clicking the Extensions button and add the libraries
in the resulting dialog box. For example, if you have enabled the
show.changes.and.commentsparameter, you need to add the following JAR library for the parameter to have an effect: DITA-OT\plugins\com.oxygenxml.common\lib\oxygen-dita-publishing-xslt-extensions.jar. -
Apply the transformation to continue the debugging process.
Note: For externally configured DITA Open Toolkit installations or when using custom plugins based on the base PDF2 plugin, the paths to resources described above may need to be adjusted accordingly.