What are some common conditional attributes used in DITA?
Common conditional attributes in DITA, such as @props and @audience, are used to tag and manage content variations to create customized outputs or audience-specific documents.
Using Conditional Attributes
DITA provides various conditional attributes to help authors and organizations manage content variations efficiently. Some common attributes include @props, @audience, @product, @platform, and @otherprops.
@props
This attribute allows for defining conditional values. For example, props="print" can be used to tag content for print output and props="online" for online output. Content can be selectively included or excluded based on these values.
@audience
Used to specify the intended audience for content. For example, audience="beginner" and audience="expert" can be used to tailor content to different user levels.
@product
Helpful for content related to different product versions. An author can use product="v1.0" and product="v2.0" to manage version-specific content.
@platform
Useful for content specific to different platforms or operating systems. For example, platform="windows" and platform="mac" can be applied to tag OS-specific instructions.
@otherprops
A catch-all attribute that allows for defining additional custom conditions. For example, otherprops="maintenance" can be used to include maintenance-related content.
Example
In a DITA map for an IT manual, different sections are tagged with conditional attributes. A troubleshooting section might have props="online" to ensure it’s included in the online version but excluded in print. Another section with advanced configuration steps can be tagged with audience="expert", making it accessible to advanced users while hidden from beginners. By leveraging these common conditional attributes, organizations can efficiently create content customized for diverse outputs and audiences.