Page 1 of 1

Problem trying to use HTML2 (DITA 4 Publishers) with oXygen 18.1

Posted: Wed Mar 15, 2017 8:06 pm
by Martin Honnen
I am completely new to DITA so I maybe doing something wrong but I am having trouble using a transformation HTML2 (DITA 4 Publishers) on a DITA map/project, both with a simple project I created on my own as well as with the MobilePhone samples project. The build fails with an error saying

Code: Select all

BUILD FAILED
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\build.xml:41: The following error occurred while executing this line:
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.dita-community.adjust-copy-to\adjust-copy-to-preprocess.xml:96: Warning: Could not find file C:\Users\UserName\Documents\OxygenXMLEditor\dita-test\temp\html2\keydef.xml to copy.
for my own sample project respectively a similar

Code: Select all

BUILD FAILED
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\build.xml:41: The following error occurred while executing this line:
C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.dita-community.adjust-copy-to\adjust-copy-to-preprocess.xml:96: Warning: Could not find file C:\Users\UserName\Documents\OxygenXMLEditor\samples\dita\MobilePhone\temp\html2\oxygen_dita_temp\keydef.xml to copy.
for the MobilePhone project. I can post the full output from oXygen if that helps but first I would like to ask whether that transformation HTML2 (DITA 4 Publishers) works for someone else in oXygen for the MobilePhone samples project or how to get it working with such a project.

Re: Problem trying to use HTML2 (DITA 4 Publishers) with oXygen 18.1

Posted: Thu Mar 16, 2017 11:50 am
by Radu
Hi Martin,

The DITA For Publishers plugins do not work very well with DITA Open Toolkit 2.x. I could not reproduce the problem you mentioned using the DITA OT 2.x bundled with Oxygen though (and without any extra changes). Did you install custom plugins in the DITA OT 2.x bundled with Oxygen?
In the Oxygen Preferences->"DITA" page you can switch to using DITA OT 1.8. Does publishing using this older DITA OT work better for you.

Regards,
Radu

Re: Problem trying to use HTML2 (DITA 4 Publishers) with oXygen 18.1

Posted: Thu Mar 16, 2017 12:28 pm
by Martin Honnen
I have now tried to switch to the DITA 1.8 version, as suggested, but I then get different errors

Code: Select all

System ID: C:\Users\UserName\Documents\OxygenXMLEditor\samples\dita\MobilePhone\mobilePhone.ditamap
Scenario: mobilePhone (HTML2 (DITA 4 Publishers))
Input file: C:\Users\UserName\Documents\OxygenXMLEditor\samples\dita\MobilePhone\mobilePhone.ditamap
Engine name: DITA-OT
Severity: fatal
Description: Transformation failed.

System ID: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT\plugins\net.sourceforge.dita4publishers.html2\xsl\map2html2DynamicToc.xsl
Scenario: mobilePhone (HTML2 (DITA 4 Publishers))
Input file: C:\Users\UserName\Documents\OxygenXMLEditor\samples\dita\MobilePhone\mobilePhone.ditamap
Engine name: DITA-OT
Severity: fatal
Description: Parameter parentId is not declared in the called template
Start location: 223:69

System ID: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT\plugins\net.sourceforge.dita4publishers.html2\xsl\map2html2DynamicToc.xsl
Scenario: mobilePhone (HTML2 (DITA 4 Publishers))
Input file: C:\Users\UserName\Documents\OxygenXMLEditor\samples\dita\MobilePhone\mobilePhone.ditamap
Engine name: DITA-OT
Severity: fatal
Description: Parameter parentId is not declared in the called template
Start location: 235:69

System ID: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT\plugins\net.sourceforge.dita4publishers.html2\xsl\map2html2DynamicToc.xsl
Scenario: mobilePhone (HTML2 (DITA 4 Publishers))
Input file: C:\Users\UserName\Documents\OxygenXMLEditor\samples\dita\MobilePhone\mobilePhone.ditamap
Engine name: DITA-OT
Severity: fatal
Description: Parameter parentId is not declared in the called template
Start location: 249:69
As for the problem with the version 2, no, I hadn't changed anything, I just opened the sample project, selected what seemed to be the main map mobilePhone.ditamap and, created a transformation scenario and from the offered transformation scenarios used HTML2 (DITA 4 Publishers). If you have some idea why that works for you but not for me let me know, otherwise I guess I first have to spend some more time with step by step tutorials on DITA publishing to figure out how it is supposed to work.

Re: Problem trying to use HTML2 (DITA 4 Publishers) with oXygen 18.1

Posted: Thu Mar 16, 2017 2:35 pm
by Radu
Hi Martin,

Looks like the DITA For Publishers 0.0.19 bundled with our DITA OT 1.8 had a small bug.
You can open this XSLT stylesheet:

OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\net.sourceforge.dita4publishers.html2\xsl\map2html2DynamicToc.xsl

search for all instances of:

Code: Select all

<xsl:call-template name="construct-tree-item-for-group-or-term">
....
and remove from the 3 call templates all the parameter references <xsl:with-param ..../>.

Our main interest in DITA For Publishers is for EPUB output so probably we did not test it much for producing HTML 2.

Regards,
Radu