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:


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

Code Snippets:

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


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

Legal Notices:

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


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

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>
    

Lists:

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


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

Common Steps:

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


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

Tables:

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


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