Monday, 20 August 2007

Using a DITAVAL file with FM+DITA

For some reason, the conditional processing parameter dita.input.valfile is not recognized by the DITA Open Toolkit when you're using the FM+DITA plugin.
There's a workaround: add the value to the ditafm.ini file in the ditafm folder of your root FrameMaker installation.
The procedure is quite straightforward:
  1. Define the attributes in your topic files that you wish to make conditional (for example, set audience to "internal", product to "XMS Version 1" or platform to "Unix").

  2. Open the ditafm.ini file in a text editor. Find the AntCommand line (in the [BuildFile] section) and add -Ddita.input.valfile="path_to_ditaval_file". For example:
    AntCommand=ant -Ddita.input.valfile="C:/WORK/VMXMSRepository/en-GB/XMS Help System/Common/common.ditaval"
  3. Create a .ditaval file in the specified location. The content is described in the DITA OT documentation. For example:
    <?xml version="1.0"?>
    <val>
    <prop att="product" val="m3" action="exclude" />
    </val>
  4. Restart FrameMaker to take the changes to the ditafm.ini file into account.
Note that this approach has one serious disadvantage: the ditafm.ini file controls all conditional processing, so you can't have several different .ditaval files active simultaneously. Let's hope they address this problem soon.

It's also not yet clear how this works in FrameMaker 8.0, as the aforementioned [BuildFile] section is missing from the ditafm.ini file supplied with FrameMaker 8.0 altogether (btw, it's now in the fminit/ditafm folder).

No comments: