Hi everyone,
I am writing a plugin for DITA OT PDF2. This plugin needs extension functions, so I followed the tutorials from the DITA OT website:
and
The jar is next to the plugin.xml file and I have this feature:
<feature extension="dita.conductor.lib.import" file="./xslt-extension.jar"/>
Sadly, I get an XSLT compilation error:
transform.topic2fo.main:
[pipeline] Static error in {ftd:lastApplicability()} in expression in xsl:variable/@select on line 30 column 79 of applicability.xsl:
[pipeline] XPST0017: Cannot find a 0-argument function named {https://orlandotechpubs.com/}lastApplicability()
[pipeline] Static error near {...eApplicability($applicabili...} in expression in xsl:value-of/@select on line 99 column 69 of applicability.xsl:
[pipeline] XPST0017: Cannot find a 1-argument function named {https://orlandotechpubs.com/}writeApplicability()
I double checked everything and my extension functions are defined correctly. So I tried to debug by creating a simple java "main" that I call from a target:
<target name="testJava">
<java classname="com.infotel.ftd.MyTest">
</java>
</target>
The target is called before "clean-temp" in the pipeline:
<feature extension="depend.preprocess.clean-temp.pre" value="testJava"/>
And now I get the following error:
[java] Could not find com.infotel.ftd.MyTest. Make sure you have it in your classpath
So I understand that my JAR file is not added to the classpath, but why? I even looked in env.bat and the jar is listed there:
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\org.dita.pdf2\lib\fo.jar"
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\com.infotel.orlando.pdf\xslt-extension.jar"
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\org.dita.eclipsehelp\lib\eclipsehelp.jar"
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\org.dita.htmlhelp\lib\htmlhelp.jar"
set "CLASSPATH=%CLASSPATH%;%DITA_HOME%\plugins\org.dita.pdf2.axf\lib\axf.jar"
...