Help with conditional output using .ditaval

Having trouble installing Oxygen? Got a bug to report? Post it all here.
altein
Posts: 13
Joined: Mon Jan 18, 2010 4:32 pm

Help with conditional output using .ditaval

Post by altein »

I would like to use a filter to determine whether or not to include
an image in the output, depending on whether the output is pdf,
or .chm

I have a task topic (referenced by the ditamap) that contains a reference an image:

<image href="../Image/SearchClinical1900.jpg" product="chm"/>

Then, for the transformation scenario, I create new transformation scenario based on Idiom-FO. I select to use a filter using a ditaval
file. The file contains the following code:
<?xml version="1.0" encoding="UTF- 8"?>
<val>
<prop action="exclude" val="chm" att="product" />
</val>

I run the transformation, but the image still appears, regardless of the product attribute. I change:
<image href="../Image/SearchClinical1900.jpg" product="chm"/>

to

<image href="../Image/SearchClinical1900.jpg" product="pdf"/>

and the image still appears.

Am I setting up the condition correctly? Am I missing a step?

Most appreciative,
Allan
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Help with conditional output using .ditaval

Post by Radu »

Hi Allan,

Your ditaval file seems OK.
Please make sure you associate it properly:
Edit the Oxygen transformation scenario, go to the Filters tab, select the Use DITAVAL file and choose the file's location.

After you run the transformation and it still does not work you can search in the Oxygen transformation console for exceptions like:
java.io.FileNotFoundException

If you find one then probably the path to the ditaval file is wrong.

Also you can search for:
-Ddita.input.valfile
It should be set properly to the path to the DITAVAL file.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
altein
Posts: 13
Joined: Mon Jan 18, 2010 4:32 pm

Re: Help with conditional output using .ditaval

Post by altein »

Thank you,
It works now.

Allan
Post Reply