What elements are commonly reused in DITA documentation?

In DITA, several types of elements are commonly reused to ensure content consistency and streamline the authoring process. These elements can be found across various topics and documents. Common elements which get reused include warnings and notes, code snippets, legal notices, product names and terminology, lists, common steps, and tables.

Warnings and Notes:

Elements like <note>, <warning>, <caution>, or <important> are often reused to provide consistent warning messages and call attention to specific information. For example:

          <p>Do not attempt to modify the system settings without proper authorization.</p>

Code Snippets:

Reusable <codeblock> element is used to present code examples or snippets consistently throughout technical documentation. For example:

          <codeph>int main() {</codeph>
          <codeph>    printf("Hello, World!");</codeph>
          <codeph>    return 0;</codeph>

Legal Notices:

Elements like <legalnotice> can be reused to ensure standardized legal disclaimers or copyright statements. For example:

          <p>© 2023 ABC Software, Inc. All rights reserved.</p>

Product Names or Terminology:

Consistent product names or terminology can be reused using elements like <ph>, <productname>, or <term>. For example:

        <p>The <productname>XYZ Pro</productname> offers advanced features.</p>


Reusable lists, such as <ul> (unordered lists) or <ol> (ordered lists), are used to maintain consistent formatting for various types of lists. For example:

          <li>Item 1</li>
          <li>Item 2</li>
          <li>Item 3</li>

Common Steps:

Standardized steps in procedures can be reused using elements like <step> to ensure consistency in task-based content. For example:

          <cmd>Open the settings menu.</cmd>
          <info>Click the gear icon in the top right corner.</info>


Elements like <table> or specific table elements can be reused for consistent presentation of tabular information. For example:

          <title>Feature Comparison</title>
          <!-- Table rows and columns -->