Conditional processing concepts

When DITA content is processed to a reading format, rules to exclude or highlight some of the content can be defined in a ditaval file. This conditional processing requires metadata attributes to be set on DITA elements that may possibly be excluded or highlighted.

Conditional publishing or conditional processing in DITA is the technique where metadata attributes set in the DITA content are used as the basis for filtering (excluding) or flagging (highlighting) portions of the content during the transformation process. The rules for what to filter or flag are typically defined in a separate DITA values (ditaval) file, which is nominated when the transformation process is started.

Flagging is a method of highlighting where the content is highlighted with a symbol or formatting. The rules for flagging are typically defined in the ditaval file.

Nearly all DITA elements, from topics through to inline elements, have a common set of metadata attributes intended for conditional processing:
  • audience
  • platform
  • product
  • otherprops

For example, a paragraph in a topic might have an audience attribute of administrator, and in some contexts, the content needs be published so that any administrator paragraphs are excluded. In this case, the ditaval file would be defined so that elements with an audience attribute value of administrator are excluded.

The rev attribute, also common to most DITA elements, can be used for flagging, but not filtering. It is used for recording the version or revision of the documentation in which the element was added or changed.