Modify DTDs for domain specialization

DITA domains are implemented with two files:

For domain specialization, create both files. In the .mod file, declare the specialized elements; in the .ent file, declare the entities for integration-related information. The .ent file is required because domain specialized elements must be available wherever their base elements are.

After creating these files, update the ditabase.dtd for implementing domain specialization for <topic>. The steps in the following sections define three new domain specialized elements for <image>, <prolog>, and <link> for <topic>.

For implementing domain specialization for <map>, follow the same procedure but edit the following files:

Create the .mod file

  1. Copy any existing .mod file and rename it. For example, copy utilitiesDomain.mod and save it as domainsp.mod.

    Note: In the following three steps, remove the existing declarations in the specified sections and replace them with the information for the new elements. This way you retain the formatted structure of the existing DTDs and map parallel information when declaring new elements.
  2. Open the new mod file, domainsp.mod. In the section Element Name Entities, declare the new entities for the specialized elements.



  3. Declare the new specialized elements. Copy the following lines for the specialized element, <Dimage>.



  4. In the Specialization Attribute Declarations section, declare the element from which the specialized element is derived. Declare the hierarchy down to the base <topic> or <map> type (starting with a “+” for domain specialization). For example, if the specialized element is derived from another utility domain element, define the complete hierarchy from specialized element to utilities domain to topic. (The utilities domain is specialized from <topic>.)



Create the .ent file

  1. Create the .ent file with the filename domainsp.ent.

    The information in this file allows the elements to be substituted instead of aggregated. That is, wherever the base element is allowed, its specialized element is also allowed.

    Note: As with the .mod files, you can rename an existing .ent file and replace the declaration statements as required.
  2. Open the .ent file and declare the entities for integration of new elements with the existing ones (using domain extensions).



  3. Declare the domain attribute entity to define the ancestry down to the root from which the elements are derived. If you are specializing any element from some domain extension, then you need to declare up to the top.



Update ditabase.dtd

Integrate the specialized .mod file with the existing ones by modifying ditabase.dtd. For domain specialization, specify both the .mod and .ent files in the ditabase.dtd as follows:

  1. Define the new domain in the vocabulary section in the Domain Entity Declarations section.



  2. Define the vocabulary substitution for the specialized elements. Include the elements from which the domain specialized elements extend.



  3. Add the vocabulary attribute declaration statements.



  4. Specify the vocabulary definition and include the .mod file for domain element integration. This entry includes all the specialized elements declared in the .mod file.




September 29, 2022

Legal Notices | Online Privacy Policy