For testing purposes, copy the standard topic.dtd
file to a convenient location, either in the same directory as the constraint module file or in a nearby directory. To make its purpose clear you can name it something like topic-with-highlight-constraint.dtd
if you want.
&included-domains;
text entity to include a reference to the &topic-constraints;
text entity:<!-- ============================================================= --> <!-- DOMAINS ATTRIBUTE OVERRIDE --> <!-- ============================================================= --> <!-- Must be declared ahead of the DTDs, which puts @domains first in order --> <!ENTITY included-domains "&hi-d-att; &ut-d-att; &indexing-d-att; &hazard-d-att; &abbrev-d-att; &pr-d-att; &sw-d-att; &ui-d-att; &topic-constraints; " >
This adds the declaration of the topic-element-type constraint module to the @domains
attribute for the <topic>
element as configured in this document type shell.
... <!-- ============================================================= --> <!-- CONTENT CONSTRAINT INTEGRATION --> <!-- ============================================================= --> <!ENTITY % hiOnlyTopic-c-def SYSTEM "highlightOnlyTopicConstraint.mod"> %hiOnlyTopic-c-def; <!-- ============================================================= --> <!-- TOPIC ELEMENT INTEGRATION --> <!-- ============================================================= --> ...
The topic.dtd file you started with may or may not have the "CONTENT CONSTRAINT INTEGRATION" comment. If it's not there, add it.