Example: Apply multiple constraints to a single document-type shell
You can apply multiple constraints to a single document-type shell. However, there can be only one constraint for a given element or domain.
Example
Here is a list of constraint modules and what they do:
File name | What it constrains | Details | Contribution to the @domains attribute |
---|---|---|---|
example-TopicConstraint.mod | <topic> |
|
(topic basic-Topic-c) |
example-SectionConstraint.mod | <section> |
|
(topic idRequired-section-c) |
example-HighlightingDomainConstraint.mod | Highlighting domain | Reduces the highlighting domain elements to <b> and
<i> |
(topic hi-d basic-HighlightingDomain-c) |
example-PhConstraint.ent | <ph> |
Removes the <ph> element |
(topic noPh-ph-c) |
All of these constraints can be integrated into a single document-type shell for
<topic>
, since they constrain distinct element types and domains.
The constraint for the highlighting domain must be integrated before the "DOMAIN ENTITIES"
section, but the order in which the other three constraints are listed does not matter.
Each constraint module provides a unique contribution to the @domains
attribute. When integrated into the document-type shell for <topic>
,
the effective value of the domains attribute will include the following values, as well as
values for any other modules that are integrated into the document-type shell:
(topic basic-Topic-c) (topic idRequired-section-c) (topic hi-d basic-HighlightingDomain-c) (topic noPh-ph-c)