Specialization
The specialization feature of DITA
allows for the creation of new element types and attributes that are explicitly and
formally derived from existing types. This facilitates interchange of conforming DITA
content and ensures a minimum level of common processing for all DITA content. It
also
allows specialization-aware processors to add specialization-specific processing to
existing base processing.
In this section:
- Overview of specializationSpecialization allows information architects to define new kinds of information (new structural types or new domains of information), while reusing as much of existing design and code as possible, and minimizing or eliminating the costs of interchange, migration, and maintenance.
- ModularizationModularization is at the core of DITA design and implementation. It enables reuse and extension of the DITA specialization hierarchy.
- Vocabulary modulesA DITA element type or attribute is declared in exactly one vocabulary module.
- Specialization rules for element typesThere are certain rules that apply to element type specializations.
- Specialization rules for attributesThere are certain rules that apply to attribute specializations.
- @class attribute rules and syntaxThe specialization hierarchy of each DITA element is declared as the value of the @class attribute. The @class attribute provides a mapping from the current name of the element to its more general equivalents, but it also can provide a mapping from the current name to more specialized equivalents. All specialization-aware processing can be defined in terms of @class attribute values.
- @domains attribute rules and syntaxThe @domains attribute enables processors to determine whether two elements or two documents use compatible domains. The attribute is declared on the root element for each topic or map type. Each structural, domain, and constraint module defines its ancestry as a parenthesized sequence of space-separated module names; the effective value of the @domains attribute is composed of these parenthesized sequences.
- Specializing to include non-DITA contentYou can extend DITA to incorporate standard vocabularies for non-textual content, such as MathML and SVG, as markup within DITA documents. This is done by specializing the <foreign> or <unknown> elements.
- Sharing elements across specializationsSpecialization enables easy reuse of elements from ancestor specializations. However, it is also possible to reuse elements from non-ancestor specializations, as long as the dependency is properly declared in order to prevent invalid generalization or conref processing.