User Guide
Table of Contents
User Guide
Conditional Processing Overview

Conditional Processing is a powerful capability in DITA that enables you to identify content that should only appear in certain outputs, depending on your publishing parameters.

Conditionalize your content by setting Conditional Processing Attributes on elements in topics or maps. This way, you can control what content is included or excluded at publish based on the output format.

Let’s look at some examples of when to use conditionalization:
  • You’re documenting a software package that has different features or functionality for the Windows and Linux platforms.
  • You’re creating an electronic document output that hides complex technical information from basic users but displays it to advanced users.
  • Your company produces vehicles with the driver controls on the right for some markets and on the left for others.
Instead of keeping two separate document sets for the content, you can set Conditional Processing Attributes on elements to include or exclude the content during output.
DITA provides several built-in Conditional Processing Attributes, including: Audience, Platform, Product, and Other Properties. These are predefined attributes in DITA that you can set to any value. For instance, you can set the Audience attribute to “Novice” or the Platform attribute to “Windows”. The values you choose are entirely up to you.
Once you’ve set your values for the Conditional Processing Attributes, you’ll need to create a DITAVal file. A DITAVal file contains “rules” for which Conditional Processing Attributes and values to include or exclude. Then at publish, you can select the DITAVal file you want to use for conditional processing. So, only the content included based on the DITAVal file will publish.
section

Conditionalizing at the Element Level

You can filter elements in a topic using the Properties Pane in the Topic Editor . For example, you can select an unordered list and modify the Audience to “Novice”, so the unordered list will only appear in the output if the Novice Audience is configured to be included.
section

Conditionalizing Entire Topics or Sections of a Map

You can also conditionalize an element in a map using the Edit Properties window in the Map Editor . To access the Edit Properties window, right-click an element in the map and select Edit Element Attributes .
For example, in the element’s properties, you can modify the Product to “Mobile”, so the topic will only appear in the output if Mobile Products are configured to be included.