Apply additional constraints for DITA 1.3

Constraints allow you to limit the elements or attributes that can be used in certain contexts. For example, you might want to prevent the use of refsyn and related elements in reference topics. If you don't need to use those elements, you can constrain to simplify the authoring experience for authors. Constraints enable you to use a subset of the structure allowed by the DITA standard in a given context; you cannot use constraints to enable use of structure that the DITA standard itself does not allow.

CAUTION: Be very careful with this change. If you activate the constraints in CompanyDitabase.dtd after you already have content that references it, that content might becomes invalid if it uses elements that are no longer allowed due to the new constraints. You must either edit the content so that it is no longer invalid or you must edit it so that it no longer references CompanyDitabase.dtd. The former is obviously the recommended option. To avoid creating this situation, IXIASOFT strongly recommends making these decisions before you accumulate a large amount of content.
  1. Check out and open CompanyDitabase.dtd.
  2. Find the IXIASOFT Additional Constraints section:
    <!-- ================== IXIASOFT Additional Constraints ========== -->
    <!--                    Strict Paragraph prevents the use of dl, fig, 
                            lines, lq, note, object, ol, pre, simpletable, 
                            sl, table and ul inside a <p>              -->
    <!--
    <!ENTITY % strictPara-c-def 
      PUBLIC "-//IXIA//ELEMENTS IXIA DITA Strict Paragraph Constraint//EN" 
             "../../com.ixiasoft.dita13.dtd/dtd/strictParaConstraint.mod"
    >%strictPara-c-def;
    -->
    <!--                    Strict Section prevents the insertion of text
                            directly inside a section                  -->
    <!--
    <!ENTITY % strictSection-c-def 
      PUBLIC "-//IXIA//ELEMENTS IXIA DITA Strict Section Constraint//EN" 
             "../../com.ixiasoft.dita13.dtd/dtd/strictSectionConstraint.mod"
    >%strictSection-c-def;
    -->

    This section contains two entities, strictPara-c-def and strictSection-c-def. The first entity, as you can read in the comment, prohibits the use of certain elements within a <p> element that would normally be allowed. The second entity does the same for <section>. Both of these entities are commented out by default.

    IXIASOFT provides these two constraints as examples. If you find that you need to edit either of them (rather than using them as-is), IXIASOFT recommends that you create your own modules rather than edit strictParaConstraint.mod or strictSectionConstraint.mod. You can copy those two files to the dtd subfolder of your DTD plugin, rename them, and edit them as needed. Then, in CompanyDitabase.dtd, use those modules as the definitions of the strictPara-c-def and strictSection-c-def entities. Be sure to adjust the relative paths.

    You can follow this same process to create additional constraints of your own.

  3. If you want to activate either or both of these constraints, uncomment the appropriate entity.

    As you can see, these entities reference two files, strictParaConstraint.mod, and strictSectionConstraint.mod. These two files also live in REPOSITORY/system/plugins/com.ixiasoft.dita13.dtd/dtd. Now that you are referencing them from CompanyDitabase.dtd, which does not live in the same folder as these two .mod files, you must change the system identifier paths to correctly point to the files:

  4. Scroll back in the file to find the following section, just above the CONTENT CONSTRAINT INTEGRATION section:
    <!--                    Add the following domains if paragraph and 
                            section constraints are enabled
                               &para-constraints;
                               &section-constraints;
    -->
  5. Add the constraint(s) that you enabled to the included-domains list.
    <!ENTITY included-domains 
                              "&concept-att;
                               &reference-att;
                               &task-att;
                               ...  
                               &mathml-d-att;
                               &equation-d-att; 
                               &para-constraints;						   
                              "
    >
  6. Save, close, and check in CompanyDitabase.dtd.