Example: Constrain a domain module

Darwin Information Typing Architecture (DITA) Version 1.3 Part 1: Base Edition

Document
Darwin Information Typing Architecture (DITA) Version 1.3 Part 1: Base Edition
Version
1.3
Author
OASIS DITA Technical Committee

In this scenario, an information architect wants to use only a subset of the elements defined in the highlighting domain. She wants to use b and i, but not line-through, overline, sup, sup, tt, or u. She wants to integrate this constraint into the document-type shell for task.

  1. She creates reducedHighlightingDomainConstraint.mod, where "reduced" is a string that characterizes the constraint.
  2. She adds the following content to reducedHighlightingDomainConstraint.mod:
    <!-- ============================================================= -->
    <!--      CONSTRAINED HIGHLIGHTING DOMAIN ENTITIES                 -->
    <!-- ============================================================= -->
    
    <!ENTITY HighlightingDomain-constraints     
      "(topic hi-d basic-HighlightingDomain-c)"
    >
    
    <!ENTITY % HighlightingDomain-c-ph     "b | i"                 >  
  3. She then integrates the constraint module into her company-specific, document-type shell for the task topic by adding the following section directly before the "DOMAIN ENTITY DECLARATIONS" comment:
    <!-- ============================================================= -->
    <!--                    DOMAIN CONSTRAINT INTEGRATION              -->
    <!-- ============================================================= -->
    
    <!ENTITY % HighlightingDomain-c-dec  
      PUBLIC "-//ACME//ENTITIES DITA Highlighting Domain Constraint//EN" 
      "acme-HighlightingDomainConstraint.mod"
    >%basic-HighlightingDomain-c-dec;
  4. In the "DOMAIN EXTENSIONS" section, she replaces the parameter entity for the highlighting domain with the parameter entity for the constrained highlighting domain:
    <!ENTITY % ph           "ph |
                             %HighlightingDomain-c-ph; |
                             %sw-d-ph; | 
                             %ui-d-ph;
                            ">
  5. She then adds the constraint to the list of domains and constraints that need to be included in the value of the domains attribute for task:
    <!-- ============================================================= -->
    <!--                    DOMAINS ATTRIBUTE OVERRIDE                 -->
    <!-- ============================================================= -->
    
    <!ENTITY included-domains 
                              "&task-att;
                               &hi-d-att; 
                               &indexing-d-att;
                               &pr-d-att; 
                               &sw-d-att;
                               &ui-d-att;
                               &taskbody-constraints;
                               &HighlightingDomain-constraints;
      "
    >
  6. After updating the catalog.xml file to include the new constraints file, her work is done.