Example: Replace a base element with the domain extensions
In this scenario, an information architect wants to remove the
<ph> element but allow the extensions of <ph>
that exist in the highlighting, programming, software, and user interface domains.
- The information architect creates an entities file named
noPhConstraint.ent
, where "no" is a qualifier string that characterizes the constraint. - The information architect adds the following content to
noPhConstraint.ent
:<!-- ============================================================= --> <!-- CONSTRAINED HIGHLIGHTING DOMAIN ENTITIES --> <!-- ============================================================= --> <!ENTITY ph-constraints "(topic noPh-ph-c)" >
Note
Because the highlighting and programming domains cannot be generalized without the <ph> element, this entity must be defined so that there is a separate parenthetical expression that can be included in the @domains attribute for the topic. - The information architect then integrates the constraint module into a document-type
shell for concept by adding the following section above the "TOPIC ELEMENT INTEGRATION"
comment:
<!-- ============================================================= --> <!-- CONTENT CONSTRAINT INTEGRATION --> <!-- ============================================================= --> <!ENTITY % noPh-ph-c-def PUBLIC "-//ACME//ELEMENTS DITA Ph Constraint//EN" "acme-PhConstraint-constraints" "noPhConstraint.ent"> %noPh-ph-c-def;
- In the "DOMAIN EXTENSIONS" section, the information architect removes the reference
to
the <ph>
element:
<!-- Removed "ph | " so as to make <ph> not available, only the domain extensions. --> <!ENTITY % ph "%pr-d-ph; | %sw-d-ph; | %ui-d-ph; ">
- She then adds the constraint to the list of domains and constraints that need to be
included in the value of the @domains
attribute:
<!-- ============================================================= --> <!-- DOMAINS ATTRIBUTE OVERRIDE --> <!-- ============================================================= --> <!ENTITY included-domains "&concept-att; &hi-d-att; &indexing-d-att; &pr-d-att; &sw-d-att; &ui-d-att; &ph-constraint; " >
- After updating the
catalog.xml
file to include the new constraints file, the information architect's work is done.