Page 1 of 1
How to debug using the dita-ot
Posted: Wed May 13, 2009 1:54 pm
by ditaot_developer
I am new to Oxygen XML Editor and would like to set up a ditamap to debug using the DITA-OT. My goal is to be able to step into the ditamap and see where a particular fo:block is being created.
I tried adding my top level stylesheets to my project, but there are many more stylesheets being referenced in the DITA-OT so the debugger keeps complaining of missing attribute sets - how do I get Oxygen to see all the relevant stylesheets? Is there a particular way to run using the dita-ot?
Re: How to debug using the dita-ot
Posted: Wed May 13, 2009 3:33 pm
by Radu
Hi,
If you are trying to debug the IDIOM FO generation using the DITA Open Toolkit included with Oxygen you can take the following steps:
1) Open the map in the DITA Maps Manager, create a "PDF - Idiom FO Plugin" transformation scenario and execute it.
2) Open in Oxygen the stage1.xml file located in the temporary directory (by default named temp) and "Format and Indent" it for better rendering.
2) Create a transformation scenario for the XML file by asssociating the OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/demo/fo/xsl/fo/topic2fo_shell.xsl stylesheet.
3) Debug the transformation scenario and it should work.
You are probably trying to debug against an incomplete XSLT stylesheet which is not valid. You should debug against the top-level stylesheet used in the build file to transform to FO.
Regards,
Radu
Re: How to debug using the dita-ot
Posted: Mon Jul 30, 2012 5:27 am
by aross
Hello-
Warning: newbie
Can I ask someone/anyone to confirm that this set of instructions should still work for Oxygen 14? Specifically I'm interested in the PDF transform.
I ask because (as I'm sure you have guessed) I've not yet been successful in getting them to work for me.
I've been using DITA for months with the default transforms. Now I need to modify the transforms and I'd like to be able to use the XSLT debugger.
I've followed the instructions below (also trying the *_1.0* stylesheet version) on an unmodified ("out of the box") set of DITA OT stylesheets. Each time I've attempted to run the transformation scenario, I've failed with the messages printed below.
I'm certain I'm missing something fundamental.
Thanks.
-A
-----------------------------------
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: Failed to compile stylesheet. 13 errors detected.
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: warning
Description: The match pattern in xsl:template may not contain references to variables
Start location: 129:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: warning
Description: The match pattern in xsl:template may not contain references to variables
Start location: 139:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named determineTopicType
Start location: 57:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 69:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 79:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named determineTopicType
Start location: 88:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 101:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 111:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 132:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 142:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 155:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 171:0
System ID: C:\Program Files\Oxygen XML Editor 14\frameworks\dita\DITA-OT\demo\fo\xsl\fo\bookmarks_1.0.xsl
Severity: error
Description: No template exists named insertVariable
Start location: 188:0
Re: How to debug using the dita-ot
Posted: Mon Jul 30, 2012 12:34 pm
by Radu
Hi,
You should make sure you are using Saxon EE 9.4.0.3 as an XSLT engine.
You can either modify the transformation scenario and choose it as an XSLT engine then "Debug" the transformation scenario or if you are in the debugger perspective there is a combo box on the toolbar allowing you to choose Saxon EE.
To remove all warnings:
Indeed newer versions of the DITA OT have added parameters which should be set to a certain value during the debug process.
The most important ones are defined in the "topic2fo.xsl":
Code: Select all
<xsl:param name="locale"/>
<xsl:param name="customizationDir.url"/>
So you should edit the transformation scenario, click the "Parameters" button and add two new parameters:
locale =>
en
and
customizationDir.url which if you do not have a customization directory should be an URL-like path pointing to the place where the bundled DITA OT is installed, on my computer it is something like:
Code: Select all
file:/C:/Users/radu_coravu/Desktop/Oxygen%20XML%20Editor%2014/frameworks/dita/DITA-OT/demo/fo/cfg/
Regards,
Radu