Configuration
Document-type configuration
Document-type configuration enables the definition of DITA document types that include only the vocabulary modules that are required for a given set of documents. There is no need to modify the vocabulary modules. Document-type configurations are implemented using document-type shells.
Overview of document-type shells
A document-type shell is an XML grammar file that specifies the elements and attributes that are allowed in a DITA document. The document-type shell integrates structural modules, domain modules, and element-configuration modules. In addition, a document-type shell specifies whether and how topics can nest.
A DITA document either must have an associated document-type definition or all required
attributes must be made explicit in the document instances. Most DITA documents have an
associated document-type shell. DITA documents that reference a document-type shell can
be validated using most standard XML processors. Such validation enables processors to
read the XML grammar files and determine default values for the
@specializations
and @class
attributes.
The following figure illustrates the relationship between a DTD-based DITA document, its document-type shell, the vocabulary modules that it uses, and the element-configuration modules (constraint and expansion) that it integrates. Similar structure applies to DITA documents that use other XML grammars.

The DITA specification contains a starter set of document-type shells. These document-type shells are commented and can be used as templates for creating custom document-type shells.
While the OASIS-provided document-type shells can be used without any modification, creating custom document-type shells is a best practice. If the document-type shells need to be modified in the future, for example, to include a specialization or integrate an element-configuration module (constraint or expansion), the existing DITA documents will not need to be modified to reference a new document-type shell.
Rules for document-type shells
This topic collects the rules that concern DITA document-type shells.
- XML grammars
-
While the DITA specification only defines coding requirements for DTD and RELAX NG, conforming DITA documents MAY use other document-type constraint languages, such as XSD or Schematron.
- Defining element or attribute types
-
With two exceptions, a document-type shell MUST NOT directly define element or attribute types; it only includes vocabulary and element-configuration modules (constraint and expansion). The exceptions to this rule are the following:
- The ditabase document-type shell directly defines the
<dita>
element. - RNG-based document-type shells directly specify values
for the
@specializations
attribute. These values reflect the details of the attribute domains that are integrated by the document-type shell.
- The ditabase document-type shell directly defines the
- Document-type shells not provided by OASIS
-
Document-type shells that are not provided by OASIS MUST have a unique public identifier, if public identifiers are used.
Document-type shells that are not provided by OASIS MUST NOT indicate OASIS as the owner. The public identifier or URN for such document-type shells SHOULD reflect the owner or creator of the document-type shell.
For example, if example.com creates a copy of the document-type shell for topic, an appropriate public identifier would be "-//EXAMPLE//DTD DITA Topic//EN", where "EXAMPLE" is the component of the public identifier that identifies the owner. An appropriate URN would be urn:pubid:example.com:names:dita:rng:topic.rng.
Equivalence of document-type shells
Two distinct DITA document types that are taken from different tools or environments might be functionally equivalent.
A DITA document type is defined by the following:
- The set of vocabulary and element-configuration modules (constraint and expansion) that are integrated by the document-type shell
- The values of the
@class
attributes of all the elements in the document - Rules for topic nesting
Two document-type shells define the same DITA document type if they integrate identical vocabulary modules, element-configuration modules (constraint and expansion), and rules for topic nesting. For example, a document-type shell that is an unmodified copy of the OASIS-provided document-type shell for topic defines the same DITA document type as the original document-type shell. However, the new document-type shell has the following differences:
- It is a distinct file that is stored in a different location.
- It has a distinct system identifier.
- If it has a public identifier, the public identifier is unique.
Conformance of document-type shells
DITA documents typically are governed by a conforming DITA document-type shell. However, the conformance of a DITA document is a function of the document instance, not its governing grammar. Conforming DITA documents are not required to use a conforming document-type shell.
Conforming DITA documents are not required to have any governing document-type declaration or schema. There might be compelling or practical reasons to use non-conforming document-type shells. For example, a document might use a document-type shell that does not conform to the DITA requirements for shells in order to meet the needs of a specific application or tool. Such a non-conforming document-type shell still might enable the creation of conforming DITA content.