What is content reuse in DITA XML?
In DITA XML, content reuse is a fundamental concept that enables organizations to efficiently manage their documentation by creating, maintaining, and reusing content components. This approach promotes modular documentation and consistency. Here’s an overview of how content reuse works in DITA XML.
Modular Topics
In DITA, content is structured into modular topics, each of which addresses a specific subject or task. These topics are designed to be self-contained and can be reused in multiple places. For example, you can create a single topic that explains a common concept and reuse it across various documents where that concept is relevant. This modularity simplifies content management and ensures that changes made to a topic are automatically reflected wherever it’s reused.
Reusable Elements
DITA XML allows you to define and store reusable elements, such as definitions, explanations, and procedures, in dedicated topic files. These elements can then be referenced and included in other topics using elements like <conref>
(conditional reference) and <conkeyref>
(conditional key reference). This means that when you update a definition or procedure in the source topic, all instances of its reuse throughout your documentation are updated as well, maintaining consistency and reducing manual effort.
Example:
Here’s an example of content reuse in DITA XML:
<topic id="shared-concept">
<title>Important Concept</title>
<p>This is an essential concept used in various places.</p>
<note>Remember this concept when working with our products.</note>
In this example, the “shared-concept” topic contains an important concept that is referenced and reused in both the “Getting Started” and “Advanced Usage” sections of the “user-guide” topic. Any changes made to the concept in “shared-concept” will be automatically reflected in the user guide.