Custom pdf plugin doesn´t work after updating to DITA-OT 3.0

175 views
Skip to first unread message

M_Hulot

unread,
Jan 25, 2018, 4:47:17 AM1/25/18
to DITA-OT Users
Hi,

I used to publish dita content using a custom pdf plugin and DITA-OT 2.5.1. After migrating and integrating the plugin to the new DITA-OT, the result was that it does not work. Here are some test details:
  • Using an ant script, as I did with DITA-OT 2.5.1, leads to errors in the XSLT-Transformation and finally to BUILD FAILED. The error messages are of the type [xslt] C:\DITA-OT\DITA-OT-3.0.1\plugins\org.dita.pdf2\cfg\fo\attrs\topic-attr.xsl:37:19: Warning! Stylesheet module topic-attr.xsl is included or imported more than once. This is permitted, but may lead to errors or unexpected behavior. I already looked up this message and found that it seems to be nonsense, because, even if so, it should not be a problem to import a module more than once.
  • Using the dita command, the BUILD is successful, but the custom pdf plugin is completely ignored, although the correct transtype is stated in the log file. The resulting pdf is just normal "pdf2"-style.
Additional notes:
  • I created my plugin according to Leigh White´s DITA-OT workbook, first edition. Later, I modified the plugin according to the notes in the 2nd edition of the book. The plugin still contains the complete attribute and style files, as it was told in the book´s first edition (and corrected in the second).
  • I changed plugin.xml and integrator.xml as showed in the DITA-OT user manual and in the workbook.

Anyone any idea, what could be the reason?

Regards.

Radu Coravu

unread,
Jan 25, 2018, 6:58:34 AM1/25/18
to M_Hulot, DITA-OT Users
For using an "ant script", that warning you posted has no influence on the failure of the publishing. Unfortunately you did not most more information about it. Probably one of the necessary JAR libraries are not loaded when starting ant.
In the folder "DITA OT 3/bin" you should find "ant.bat" and "ant" scripts, you can try to use those or at least see how they are constructed:
http://www.dita-ot.org/3.0/topics/building-with-ant.html

For using the "dita" command, maybe you should add some <echo>s in the custom build.xml your plugin contributes to see if the "dita2customtranstype" target is called.

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

M_Hulot

unread,
Jan 25, 2018, 8:05:58 AM1/25/18
to DITA-OT Users
Meanwhile, I tried and found out the following:
  • Put all the "old" commands (which are officially not necessary any more) to set the environment variables in my Batch script, just to check if any jar file was missing.  Result: No difference.
  • Checked, if something with the structure of the ant script has changed in dita-ot 3.0. Result: Nothing, it´s still all the same.
  • Found out that I´m not the only one having this problem. It rather seem to be a bug. See https://github.com/dita-ot/dita-ot/issues/2835
Fortunately, this is not an urgend case. I can still use the old 2.5.1 dita-ot, which works fine.

Radu Coravu

unread,
Jan 29, 2018, 5:42:21 AM1/29/18
to M_Hulot, DITA-OT Users
About your first two points, as I do not have the entire log data which you receive after you start the "ant" process I cannot help further. As I previously said, that " Warning! Stylesheet module " warning is benign.
About your third point, it's hard to know if you experience the same problem as the people who reported that issue do. Maybe you can login on Github and also add a reference to a zip containing your PDF plugin to the opened issue, so that if a problem is found and fixed it will also be tested and validated with your plugin.

--

M_Hulot

unread,
Jan 29, 2018, 7:24:14 AM1/29/18
to DITA-OT Users
Please find attached the logfile of the process using the ant script.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
LTSA_ETK.log

Radu Coravu

unread,
Jan 29, 2018, 7:41:36 AM1/29/18
to M_Hulot, DITA-OT Users
The relevant errors in the console output seem to be these ones:

         [xslt] C:\DITA-OT\DITA-OT-3.0.1\plugins\com.novexx.pdf-ETK\cfg\fo\xsl\back-matter.xsl:23:8: Fatal Error! Variable LLphone has not been declared (or its declaration is not in scope)
         [xslt] C:\DITA-OT\DITA-OT-3.0.1\plugins\com.novexx.pdf-ETK\cfg\fo\xsl\back-matter.xsl:43:10: Fatal Error! Variable LLcountry has not been declared (or its declaration is not in scope)

So you probably need to look in your customization XSLTs, for example in what XSLTs the " LLphone" variable is declared.

To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages