Can links be conditionally included or excluded from DITA outputs?

Conditional processing in DITA XML allows content creators to include or exclude links based on specific conditions, which significantly impacts the flexibility and customization of DITA outputs. This feature enables organizations to deliver tailored documentation to different audiences, ensuring that users receive content that is relevant to their specific needs, enhancing the overall user experience.

Inclusion or Exclusion of Links

With DITA conditional processing, links can be conditionally included or excluded from DITA outputs. Content creators can define conditions using attributes such as conkeyref and conref. When the specified conditions are met, the links are included in the output, making the linked content accessible to users. Conversely, when conditions are not met, the links are excluded, ensuring that users do not encounter irrelevant or unnecessary information. This flexibility allows organizations to provide a seamless and contextually relevant user experience.

Example:

Here’s an example that demonstrates how conditional processing can be used to include or exclude links in DITA XML:


<para conref="user-manual.dita" conkeyref="product-version"/><!-- This links to the user manual based on the product version. -->

In this example, the conref attribute links to a DITA topic, and the conkeyref attribute specifies a condition, such as the product version. If the condition is met, the link to the user manual is included in the output; otherwise, it is excluded. This ensures that users receive documentation that aligns with their specific requirements and enhances the usability of the content.