How to render transformation parameter in PDF publication

ann.jensen
Posts: 236
Joined: Wed Jun 17, 2015 10:19 am

How to render transformation parameter in PDF publication

Post by ann.jensen » Mon Mar 06, 2017 7:42 pm

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: 236
Joined: Wed Jun 17, 2015 10:19 am

Re: How to render transformation parameter in PDF publication

Post by ann.jensen » Tue Mar 07, 2017 8:30 pm

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: 7028
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to render transformation parameter in PDF publication

Post by Radu » Wed Mar 08, 2017 9:29 am

Hi Ann,

Thanks for posting the solution.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Radu
Posts: 7028
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to render transformation parameter in PDF publication

Post by Radu » Wed Mar 08, 2017 9:58 am

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