How to render transformation parameter in PDF publication

Post here questions and problems related to editing and publishing DITA content.
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

How to render transformation parameter in PDF publication

Post 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
ann.jensen
Posts: 295
Joined: Wed Jun 17, 2015 10:19 am

Re: How to render transformation parameter in PDF publication

Post 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"/>
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to render transformation parameter in PDF publication

Post by Radu »

Hi Ann,

Thanks for posting the solution.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to render transformation parameter in PDF publication

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply