Glossary · Conditional processing
DITA conditional processing
Also known as: profiling, filtering, flagging, conditional text
In DITA, conditional processing is the filtering or flagging of content based on the values of metadata attributes such as @audience, @platform, @product, @otherprops, @props and @deliveryTarget. The conditions to apply are specified at publishing time, usually in a DITAVAL file.
- DITA
- Conditional processing
In one sentence
DITA conditional processing filters or flags content by metadata attributes such as @audience or @platform, to publish variants from one source.
Example
Steps marked platform="linux" and platform="windows" in one task are filtered at publishing time, producing a Linux and a Windows version of the guide.
Explained in context
Context cards connect this term with others to answer one question. Also in British English and German.
How it applies
- Technical documentation: Conditional processing (often called profiling) produces variants from one source: a novice and an expert manual, a Linux and a Windows guide, a print and an online edition.
- Attributes: The metadata attributes for conditional processing are
@audience,@platform,@product,@otherprops,@propsand its specializations, and — new in DITA 1.3 —@deliveryTargetfor the output medium (it replaces the deprecated@print).@revcan be used for flagging only. - Filtering and flagging: Conditions are evaluated with a DITAVAL file. Filtering removes content; flagging keeps it and marks it, for example with a color or an icon.
- AI and retrieval: Filter before indexing, or index every condition value as metadata. A chunk that mixes expert and novice steps, or two platforms, can produce answers that are right for no one.
Conditional processing vs. keys
Conditional processing includes or excludes whole elements. Keys replace the value of a reference. Use keys for variable text such as product names, and conditions for content that only some readers should see.
In DITA markup
<steps>
<step platform="linux"><cmd>Run <cmdname>sudo systemctl restart purifier</cmdname>.</cmd></step>
<step platform="windows"><cmd>Restart the Purifier service in the Services console.</cmd></step>
</steps>