Hi,
I have my own plugin to customize PDF output.
I'm customizing topicmerge.xsl. I've added my own template to handle <image> elements. Works fine, using the org.dita.pdf.xsl.topicmerge extension point.
In my template I need to know the path to the dita.temp.dir and I can't find out how to pass this into the XSLT transformation.
I've done this before for the FO transformations, e.g. when customizing the xslfo XSLT transformations, by using the dita.conductor.pdf2.param extension point. But the same approach doesn't seem to work for topicmerge.xsl?
Here's what I tried for passing the parameter into my custom topicmerge.xsl:
1/ define a custom parameterfile in plugin.xml:
<feature extension="dita.conductor.pdf2.param" file="buildParameters.xml"/>
Here's also the reference to my custom topicmerge.xsl:
<feature extension="org.dita.pdf2.xsl.topicmerge" file="xsl/common/topicmerge.xsl"/>
2/ define parameter in buildParameters.xml and assign ${dita.temp.dir}:
<param name="radsol.dita.temp.dir" expression="${dita.temp.dir}"/>3/ declare the parameter in my custom topicmerge.xsl
<xsl:param name="radsol.dita.temp.dir" select="'not-set'"/>
and use it in the transformations:
<xsl:variable name="job" select="document(resolve-uri('.job.xml', $radsol.dita.temp.dir))" as="document-node()?"/>
4/ run dita.bat --install
Now when I try to read the $radsol.dita.temp.dir parameter in topicmerge.xsl, it has the default value from the <xsl:param> declaration, while I expected it to contain the value of ${dita.temp.dir}.
I have also found elsewhere in the pdf2 plugin, in topic.xsl, a parameter $work.dir.url, that also contains ${dita.temp.dir}. I can see in build.xml that this parameter is explicitly assigned in the transform.topic2fo.main target, in the <xslt> task.
The transformation that I'm working on, topicmerge.xsl, is called from the map2pdf2 target, but as a <module> task instead of an <xslt> task. So I have no idea how I should pass parameters into it, not by using the proper extension mechanisms, nor by hacking the plugin code...
But I'm quite confident that there's something very obvious that I'm overlooking :)))
Best regards,
Vic