Page 1 of 1

DITA OT Plugin: Following DITA for Print

Posted: Wed Nov 06, 2013 5:40 pm
by bthomas22
My plugin is not working correctly for Oxygen when following the new DITA for Print book. I can't figure out what the problem is with the antcall. This setup works fine in the plugin when run through DITA-OT directly. It fails on antcall target when run through oxygen. I added the transtype to the parameters, and set the fo processor to ahf. Any clues? Thanks

(build_pdf-omm_template.xml)
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.komatsu.pdf-omm" default="dita2pdf-omm">
<property name="transtype" value="pdf-omm"/>
<target name="dita2pdf-omm"
xmlns:dita="http://dita-ot.sourceforge.net"
dita:extension="depends org.dita.dost.platform.InsertDependsAction">
<property name="customization.dir" location="${dita.plugin.com.komatsu.pdf-omm.dir}/cfg"/>
<antcall target="dita2pdf2"/>
</target>
</project>

(plugin.xml)
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="com.komatsu.pdf-omm">
<require plugin="org.dita.pdf2"/>
<feature extension="dita.conductor.transtype.check" value="pdf-omm"/>
<feature extension="dita.transtype.print" value="pdf-omm"/>
<feature extension="dita.conductor.target.relative" file="build.xml"/>
</plugin>

(build.xml)
<?xml version="1.0" encoding="UTF-8"?>
<project>
<import file="build_pdf-omm_template.xml"/>
</project>

Bryon T.

Re: DITA OT Plugin: Following DITA for Print

Posted: Wed Nov 06, 2013 6:05 pm
by sorin_ristache
Hello,

First you have to integrate your plugin in Oxygen's DITA-OT using the transformation DITA-OT Integrator. Second you have to create a new DITA transformation based on the built-in DITA PDF transformation type (please select PDF in the dialog box explained on this page) as explained in step 3 and add a new parameter called transtype with the value pdf-omm. Of course you can set any FO processor you want on the FO Processor tab of your new DITA transformation (AHF, XEP, FOP).


Regards,
Sorin

Re: DITA OT Plugin: Following DITA for Print

Posted: Wed Nov 06, 2013 6:43 pm
by bthomas22
Thanks, I had already integrated the plugin and applied a new transformation scenario. I've added plugins before, this is the first time I've seen it fail based on the build file. I thought it had something to do with the plugin calling an antcall instead of a target name. That was where it failed.

Thanks

Re: DITA OT Plugin: Following DITA for Print

Posted: Thu Nov 07, 2013 7:38 pm
by bthomas22
TopicNumber was removed in the 1.8 release. I needed to remove it from the ot pdf2 plugin for 1.7, and structure it like 1.8. Then in bookmarks.xsl, remove the parameter for TopicNumber.

This error pops up if try to copy commons.xsl into your plugin. TopicNumber exists in 1.7, and is removed in DITA OT 1.8

Re: DITA OT Plugin: Following DITA for Print

Posted: Fri Nov 08, 2013 11:15 am
by sorin_ristache
Hello,

In DITA-OT 1.7 (which is the version that is included in the Oxygen kit) there is a parameter called topicNumber in both the bookmarks.xsl stylesheet and the commons.xsl one of the PDF plugin. If you want to remove this parameter you will have to remove all instances of this parameter, both in the called XSLT templates that use it and in all the places where these XSLT templates are called.

You did not specify the errors that you get when you run the PDF transform after you apply your customizations in the DITA-OT located in the directory [Oxygen-install-dir]/frameworks/dita/DITA-OT, so I cannot be sure why you get the errors in the PDF transform, but I suppose this is the cause.


Regards,
Sorin