How do I manage conditional filtering in DITA maps?

In DITA maps, conditional filtering is a process by which the inclusion or exclusion of content within documentation is controlled based on specific conditions or attributes, allowing for the creation of various document variations while maintaining a single content source. This approach is valuable when different versions of documentation or variations for specific audiences need to be generated from a common content pool. The management of conditional filtering involves associating conditional processing attributes with DITA elements or topics, defining criteria for condition assignment, and using DITAVAL files to specify condition sets for different output scenarios.

Conditional processing attributes are typically linked to elements or topics within DITA content, marking them with conditions that dictate their visibility or exclusion in the final output. These conditions can be based on various attributes such as “audience,” “product version,” “platform,” or any other relevant criteria. The DITA map, acting as the core document, references DITAVAL files that define which conditions should be active or inactive during documentation generation.

One example could be a software documentation project. Conditional filtering can be applied based on attributes like “user level” or “product version.” Content marked with conditions like “audience=’beginner'” or “product version=’3.0′” will only be included in the output if the corresponding conditions are met. This enables the creation of tailored documentation for different user groups or software versions from the same source, streamlining content management and ensuring content relevancy.

Another example could be a user manual for a software application. Specific procedures or features relevant to beginners may be marked with the condition “audience=’beginner’.” When generating documentation for beginner users, the DITAVAL file specifying this condition will activate it, ensuring that only content suitable for beginners is included. Similarly, for an advanced user audience, a different DITAVAL file with conditions tailored to advanced users would activate the corresponding content variations, resulting in a customized document without the need for duplicating or maintaining separate content sources. This approach simplifies the documentation process and enhances content consistency across different versions or audiences.