Accessing a transformation scenario parameter in a plugin bu

Oxygen general issues.
Rodrik
Posts: 30
Joined: Mon Jan 27, 2014 11:19 am

Accessing a transformation scenario parameter in a plugin bu

Post by Rodrik »

I've added the following parameter to a transformation scenario:

args.page.size with two possible values: A4 and letter.

I then added the following to C:\Program Files (x86)\Oxygen XML Editor 15\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\build_template.xml:

Code: Select all

<target name="transform.topic2fo.init">

...

<condition property="args.page.size" value="">
<not><isset property="args.page.size"/></not>
</condition>

...

</target>
And this:

Code: Select all

<target name="transform.topic2fo.main">

...
<param name="antArgsPageSize" expression="${args.page.size}"/>
...
</target>
This allows me to use the antArgsPageSize parameter in my plug-in. However, I would prefer to be able to do so without altering the org.dita.pdf2\build_template.xml file. Is there some way I can make similar changes to my build template file, which imports the org.dita.pdf2\buildxml file. My build file currently is as follows:

Code: Select all

<?xml version='1.0' encoding='UTF-8'?>
<project xmlns:dita="http://dita-ot.sourceforge.net" name="com.xxx.pdf-entersekt">

<import file="${dita.plugin.org.dita.pdf2.dir}/build.xml"/>

<target name="dita2pdf-entersekt.init">
<property name="customization.dir" location="${dita.plugin.com.xxx.pdf-xxx.dir}/cfg"/>
<property name="args.chapter.layout" value="BASIC" />
<property name="args.bookmark.style" value="COLLAPSED" />
<property name="args.gen.task.lbl" value="true" />
</target>

<target depends="dita2pdf-xxx.init, dita2pdf2" name="dita2pdf-xxx" />
</project>
Regards

Rodrik
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Accessing a transformation scenario parameter in a plugi

Post by sorin_ristache »

If you want to add a new parameter to the transform.topic2fo.main task you will have to add the parameter to that task in both files DITA-OT\plugins\org.dita.pdf2\build_template.xml and DITA-OT\plugins\org.dita.pdf2\build.xml. You can't avoid that because that is where the transform.topic2fo.main task is defined.


Regards,
Sorin
Post Reply