Modify DTDs for structural specialization

Create the .mod file for structural specialization for <topic>

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

  2. Open the new .mod file, objectsp.mod. In the section Specialization Of Declared Elements, change the info-type declaration to the new specialized structure type. The specialized structure type is required for integrating the specialized modules with existing ones. For example, replace the line:



    with this one:



    Note: Similarly 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.
  3. Declare the new entities for the specialized elements required, up to the top of the hierarchy.



  4. Declare the new specialized elements, and so on, for other elements.



  5. In the Specialization Attribute Declarations section, declare the element from which the specialized element is derived. You must declare the hierarchy down to the base <topic> or <map> type (starting with a “-” for structural specialization). For example, if the specialized element is derived from a reference element, include the complete hierarchy:

    - topic/reference/refbody specialtopic/specialbody

    Add the following lines to the Specialization Attribute Declarations section:



Update ditabase.dtd

Integrate the new .mod file with the existing ones by modifying ditabase.dtd.

Note: To avoid overwriting the original ditabase.dtd, you can rename it to ditabaseObjectsp.dtd for this example.
  1. In the Topic Nesting Override section, add the declaration for the specialized topic type. Ensure you include the base type information in the declaration.



  2. To import the new .mod file, add an entry in the Topic Element Integration of the ditabase.dtd.



Note: To restrict multiple topic types in a single topic type, create an integration file but don’t integrate topic types together as shown in this example.

September 29, 2022

Legal Notices | Online Privacy Policy