Page 1 of 1

How to render transformation parameter in PDF publication

Posted: Mon Mar 06, 2017 7:42 pm
by ann.jensen
Hi,
I have a custom plugin for transforming my DITA project in Oxygen Author out to PDF.
I would like to pass the value of a custom parameter that I have added to the transformation scenario to my plugin and render it from front-matter.xsl.
I have tried all day but cannot figure out the declaring of variables and assigning of parameter values to them :-|
any advice appreciated,
Regards,
Ann

Re: How to render transformation parameter in PDF publication

Posted: Tue Mar 07, 2017 8:30 pm
by ann.jensen
Hi,
I got an answer to this which in brief is:

Update my plugin.xml with

Code: Select all

   <feature extension="dita.conductor.pdf2.param" file="insert-parameters.xml"/>
Create insert-parameters.xml like this:

Code: Select all

   <dummy>
<param name="clientparam" expression="${client}" if="client"/>
</dummy>
and in my xslt code where I want the param value displayed, I added need to have

Code: Select all

<xsl:value-of select="$clientparam"/>

Re: How to render transformation parameter in PDF publication

Posted: Wed Mar 08, 2017 9:29 am
by Radu
Hi Ann,

Thanks for posting the solution.

Regards,
Radu

Re: How to render transformation parameter in PDF publication

Posted: Wed Mar 08, 2017 9:58 am
by Radu
Just to update this thread, if someone is interested in seeing the structure of such a plugin, a sample plugin can be found here:

https://github.com/radu-pisoi/org.dita. ... .numbering

Regards,
Radu