Are there conventions for naming specialized elements and attributes in DITA?

Yes, in DITA specialization, it is recommended to follow conventions when naming specialized elements and attributes to ensure consistency and clarity. These naming conventions are not strictly enforced by DITA, but they help content creators and teams understand the purpose and usage of specialized components. Common naming conventions for specialized elements and attributes in DITA include:

  • Prefixes: Prefixes are often used to indicate the domain or context of the specialization. For example, using a prefix like “med-” for healthcare-related elements, as in <med-symptom>.
  • Descriptive Names: Names should be descriptive and reflect the purpose or content category of the specialized element. For instance, <product-feature> is clear in its intent for product-related content.
  • Camel Case: Some naming conventions use camel case to separate words in element and attribute names, as in @softwareVersion for an attribute related to software documentation.

Following naming conventions enhances the readability and maintainability of DITA content. It helps content creators and teams quickly identify specialized components and understand their context and usage.

Example:

In a specialized DITA topic for automotive documentation, a naming convention like “auto-” is used as a prefix for elements related to automotive features, resulting in elements like <auto-feature> and @auto-model for clear and consistent naming within the automotive domain.