Apply Ditaval as Conditions

Applies conditions to files based on the filtering properties defined in a ditaval file.

The Apply Ditaval as Conditions command can be used while authoring and for setting up PDFs that are generated through FrameMaker. If the command is run with a file active, the conditions will be applied to that file. If a book is active, the conditions will be applied to all files in that book.

In order to use this command you must have at least one ditaval file and have set up the ditafmx.ini file as described in Generate Output: Current File Option. When you run the command, the dialog lists the available ditaval files (as defined in the INI file), and the options for the ditaval action “exclude” and “flag” values.

The following code shows a simple ditaval file. Each prop element has three attributes. The att and val attributes specify the filtering attribute and its value to match on. Valid values for the action attribute are “exclude” and “flag.” This file specifies two filtering schemes, the first excludes all elements whose audience attribute has the value of “admin” and the second excludes all elements whose product attribute has the value of “PROD1.”

<?xml version="1.0" encoding="UTF-8"?> 
<val> 
  <prop att="audience" val="admin" action="exclude"/> 
  <prop att="product" val="PROD1" action="exclude"/> 
</val>
Note: Currently only a portion of the DITA 1.0 specification for ditaval files is supported. Only the flag and exclude action of a prop element is applied as a condition.

For each prop element in a ditaval file the action attribute specifies either to “exclude” or “flag” elements with matching attributes and values. When a ditaval file is applied as conditions in a FrameMaker file, elements are matched based on the att and val attributes, and a named condition is applied to each element. In the Apply Conditions dialog you specify that the condition name is defined as a fixed string (such as “Exclude” or “Flag”) or that it is defined based on a combination of the att and val attribute values. For example, given the following line from a ditaval file, if the condition name is defined by the att and val attributes, it would be “audience=admin.”

<prop att="audience" val="admin" action="exclude" />

The condition visibility options are Show, Hide, and Default. If set to Show or Hide, all excluded or flagged conditions will be shown or hidden accordingly. However, if Default is selected, the condition visibility will be defined by the settings in the template.