Table of Contents
User Guide
Coniditional Processing Overview

Filtering is a powerful capability in DITA that enables you to identify content that should only appear in certain versions of your output.

Conditionalize your content by setting Conditional Processing Attributes on elements in topics or in 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 filtering:
  • You are documenting a software package that has different features or functionality for the Windows and Linux platforms
  • You are 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.

Filtering at the Element Level

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

Filtering Entire Topics or Sections of a Map

You can also filter an element in a map using the Edit Properties window in the Map Editor. 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.