Create a Ditaval file
You use the DITA CMS Ditaval view to create conditional processing profiles for your documents. Each profile that you create is stored in a .ditaval file.
A Ditaval file is created by specifying the conditions to exclude and to include when generating the output for a document. By default in the DITA open toolkit (DITA-OT), if a condition is not specified in the Ditaval file, then it is automatically included in the generated output. To exclude a condition, you must explicitly configure it as such in the Ditaval file. Any condition that is not explicitly excluded is included in the output.
When you create a Ditaval file in the Ditaval view, you can define the Default action as include, exclude, passthrough, or flag. For example, if you set the Default action to "exclude", then you would only need to specify the ones that you want to include.
To create a Ditaval file:
- Open the Ditaval view.
Right-click the folder where to add the Ditaval file and select
The Create Ditaval dialog appears, which initially lists all the conditions that are defined in the DITA CMS configuration file. For example:Note: This dialog is customized per company. If the condition that you need to set in your Ditaval is not available, ask your DITA CMS administrator to add it to the DITA CMS configuration, as described in the DITA CMS Administrator's Guide or use a subject scheme.
In the Title box, type a title for this Ditaval file.
Note: This title is also used as the Ditaval file name. It must be unique.
- In the Description box, type a description (Optional).
- If you are creating a Ditaval file for a subject scheme, select the Use a Subject Scheme checkbox and click the subject scheme that you want from the list.
- If you want to define a default action, select the Default action checkbox and click the action that you want from the list.
- In the All conditions box, select the checkboxes for the conditions that you want in your Ditaval file.
Click in the Action column and select the action that you want for each value:
- Include: content is included in the output.
- Exclude: content is excluded from the output.
- Passthrough: content is included in the output and also retains the condition as part of the output.
- Flag: content is included and marked in the output. By default no formatting of the condition is applied. Once the initial ditaval is created, you can edit the ditaval XML to add formatting attributes.
The new Ditaval file is created. You can now generate the output for a document using this Ditaval file.
If you chose flag as an
action for a condition, you can edit the ditaval to add the formatting
- Right-click the ditaval in the Ditaval view.
- Click Edit Ditaval XML.
- Find the instances of prop action="flag", add and set the color, backcolor, and style attributes as desired.
- Once you have completed your changes, save the file.
- Right-click the ditaval in the Ditaval view and click Release Ditaval XML.