Apply additional constraints
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.
- Check out and open CustomerDitabase.dtd.
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 1.2 Strict Paragraph Constraint//EN" "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 1.2 Strict Section Constraint//EN" "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.
If you want to activate either or both of these constraints, comment the
appropriate entity back in.
As you can see, these entities reference two files, strictParaConstraint.mod, and strictSectionConstraint.mod. These two files also live in REPOSITORY/system/dtd/ixia. Now that you are referencing them from CustomerDitabase.dtd, which does not live in the same folder as these two .mod file, you must change the system identifier paths to correctly point to the files:
Add the additional path levels as shown:
<!-- ================== 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 1.2 Strict Paragraph Constraint//EN" "../ixia/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 1.2 Strict Section Constraint//EN" "../ixia/strictSectionConstraint.mod"> %strictSection-c-def;
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 ¶-constraints; §ion-constraints; -->
- Comment back in the constraint(s) that you enabled.
- Save, close, and check in CustomerDitabase.dtd.
If you find that you need to edit either of these constraints, IXIASOFT recommends that you create your own modules rather than edit strictParaConstraint.mod or strictSectionConstraint.mod. You can copy those two files to REPOSITORY/system/dtd/client, rename them, and edit them as needed. Then, in CustomerDitabase.dtd, use those modules as the definitions of the strictPara-c-def and strictSection-c-def entities. You can also follow this model to create additional constraints of your own.