Edit online

Debugging DITA PDF Transformations

To debug the DITA Map PDF - based on XSL-FO transformation scenario, follow these steps:

  1. Open the Preferences dialog box (Options > Preferences), go to XML > XML Catalog, click Add, and select the file located at DITA-OT-DIR\plugins\org.dita.pdf2\cfg\catalog.xml. If there are other custom DITA-OT PDF customization plugins that contain XML catalogs, references to those XML catalogs might need to be added as well.
  2. Open the map in the DITA Maps Manager and create a DITA Map PDF - based on XSL-FO transformation scenario.
  3. Edit the scenario, go to the Parameters tab and change the value of the clean.temp parameter to no.
  4. Run the transformation scenario.
  5. Open the stage1.xml file located in the temporary directory and format and indent it.
  6. 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.fop\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 corresponding plugin folders.
    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.
  7. In the transformer drop-down menu, select the Saxon EE XSLT processor (the same processor used when the DITA-OT transformation is executed).
  8. Click the Parameters button:
    1. Set the locale parameter (e.g. with the value of en_GB).
    2. Set the work.dir.url parameter with the value ${cfdu}.
    3. Set the customizationDir.url parameter to point to either your customization directory or to the default DITA-OT customization directory. Its value should have a URL syntax like this:
      file://c:/path/to/<term keyref="glossentry_dita_ot_dir"/>/plugins/org.dita.pdf2/cfg
  9. You need to reference the extra commonly used JAR libraries by clicking the Extensions button and using wildcards to add a reference to all libraries in this folder: DITA-OT\plugins\com.oxygenxml.common\lib\*.
  10. 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.