Page 1 of 1

Help with conditional output using .ditaval

Posted: Tue Feb 23, 2010 12:19 am
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

Re: Help with conditional output using .ditaval

Posted: Tue Feb 23, 2010 11:07 am
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

Re: Help with conditional output using .ditaval

Posted: Tue Feb 23, 2010 8:33 pm
by altein
Thank you,
It works now.

Allan