@domains attribute component text entity in the &included-domains; entity.Thus, deleting a domain module means removing all four of these bits for a given domain.
myTopic.dtd, perform these steps:%pr-d-dec; parameter entity and delete it:...
<!ENTITY % abbrev-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Abbreviated Form Domain//EN"
"abbreviateDomain.ent"
>%abbrev-d-dec;
<!ENTITY % pr-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Programming Domain//EN"
"programmingDomain.ent"
>%pr-d-dec;
<!ENTITY % sw-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Software Domain//EN"
"softwareDomain.ent"
>%sw-d-dec;
...
...
<!-- ============================================================= -->
<!-- DOMAIN EXTENSIONS -->
<!-- ============================================================= -->
<!-- One for each extended base element, with
the name of the domain(s) in which the
extension was declared -->
<!ENTITY % pre "pre |
%pr-d-pre; |
%sw-d-pre; |
%ui-d-pre;
">
<!ENTITY % keyword "keyword |
%pr-d-keyword; |
%sw-d-keyword; |
%ui-d-keyword;
">
<!ENTITY % ph "ph |
%hi-d-ph; |
%pr-d-ph; |
%sw-d-ph; |
%ui-d-ph;
">
<!ENTITY % term "term |
%abbrev-d-term;
">
<!ENTITY % fig "fig |
%pr-d-fig; |
%ut-d-fig;
">
<!ENTITY % dl "dl |
%pr-d-dl;
">
<!ENTITY % index-base "index-base |
%indexing-d-index-base;
">
<!ENTITY % note "note |
%hazard-d-note;
">
...
...
<!-- ============================================================= -->
<!-- DOMAIN EXTENSIONS -->
<!-- ============================================================= -->
<!-- One for each extended base element, with
the name of the domain(s) in which the
extension was declared -->
<!ENTITY % pre "pre |
%sw-d-pre; |
%ui-d-pre;
">
<!ENTITY % keyword "keyword |
%sw-d-keyword; |
%ui-d-keyword;
">
<!ENTITY % ph "ph |
%hi-d-ph; |
%sw-d-ph; |
%ui-d-ph;
">
<!ENTITY % term "term |
%abbrev-d-term;
">
<!ENTITY % fig "fig |
%ut-d-fig;
">
<!ENTITY % dl "dl
">
<!ENTITY % index-base "index-base |
%indexing-d-index-base;
">
<!ENTITY % note "note |
%hazard-d-note;
">
&included-domains; entity. Delete the reference to the &pr-d-att; 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;
"
>
...
...
<!-- ============================================================= -->
<!-- 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;
&sw-d-att;
&ui-d-att;
"
>
...
%pr-d-def; parameter entity and delete it:...
<!ENTITY % ui-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 User Interface Domain//EN"
"uiDomain.mod"
>%ui-d-def;
<!ENTITY % pr-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Programming Domain//EN"
"programmingDomain.mod"
>%pr-d-def;
<!ENTITY % sw-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Software Domain//EN"
"softwareDomain.mod"
>%sw-d-def;
...
myTopic.dtd file, any validation errors must be the result of something in the DTD file itself.Repeat this process for each of the other domains you don't want.
Notice that the naming convention used for domain-related components makes it easy to find the bits for a given domain: just search on "domainShortName-d" where domainShortName is the short name for the domain, e.g., "pr", "ui", "sw", etc.
<?xml version="1.0" encoding="UTF-8"?>
<!-- =============================================================
My Topic Shell
Sample topic type shell demonstrating removing some domains
and adding others.
============================================================= -->
<!-- ============================================================= -->
<!-- TOPIC ENTITY DECLARATIONS -->
<!-- ============================================================= -->
<!-- ============================================================= -->
<!-- DOMAIN ENTITY DECLARATIONS -->
<!-- ============================================================= -->
<!ENTITY % hi-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Highlight Domain//EN"
"../../base/dtd/highlightDomain.ent"
>%hi-d-dec;
<!ENTITY % xml-d-dec
PUBLIC "urn:pubid:example.org:doctypes:dita:modules:xml:entities"
"xmlDomain.ent"
>%xml-d-dec;
<!ENTITY % ut-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Utilities Domain//EN"
"../../base/dtd/utilitiesDomain.ent"
>%ut-d-dec;
<!ENTITY % indexing-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Indexing Domain//EN"
"../../base/dtd/indexingDomain.ent"
>%indexing-d-dec;
<!ENTITY % abbrev-d-dec
PUBLIC "-//OASIS//ENTITIES DITA 1.2 Abbreviated Form Domain//EN"
"abbreviateDomain.ent"
>%abbrev-d-dec;
<!-- ============================================================= -->
<!-- DOMAIN ATTRIBUTE DECLARATIONS -->
<!-- ============================================================= -->
<!-- ============================================================= -->
<!-- DOMAIN EXTENSIONS -->
<!-- ============================================================= -->
<!-- One for each extended base element, with
the name of the domain(s) in which the
extension was declared -->
<!ENTITY % pre "pre
">
<!ENTITY % keyword "keyword |
%xml-d-keyword;
">
<!ENTITY % ph "ph |
%hi-d-ph;
">
<!ENTITY % term "term |
%abbrev-d-term;
">
<!ENTITY % fig "fig |
%ut-d-fig;
">
<!ENTITY % dl "dl
">
<!ENTITY % index-base "index-base |
%indexing-d-index-base;
">
<!ENTITY % note "note
">
<!-- ============================================================= -->
<!-- DOMAIN ATTRIBUTE EXTENSIONS -->
<!-- ============================================================= -->
<!ENTITY % props-attribute-extensions
""
>
<!ENTITY % base-attribute-extensions
""
>
<!-- ============================================================= -->
<!-- TOPIC NESTING OVERRIDE -->
<!-- ============================================================= -->
<!-- Redefine the infotype entity to exclude
other topic types and disallow nesting -->
<!ENTITY % topic-info-types
"topic
"
>
<!-- ============================================================= -->
<!-- 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;
&abbrev-d-att;
&xml-d-att;
"
>
<!-- ============================================================= -->
<!-- TOPIC ELEMENT INTEGRATION -->
<!-- ============================================================= -->
<!-- Embed topic to get generic elements -->
<!ENTITY % topic-type
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Topic//EN"
"../../base/dtd/topic.mod"
>
%topic-type;
<!-- ============================================================= -->
<!-- DOMAIN ELEMENT INTEGRATION -->
<!-- ============================================================= -->
<!ENTITY % hi-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Highlight Domain//EN"
"../../base/dtd/highlightDomain.mod"
>%hi-d-def;
<!ENTITY % xml-d-def
PUBLIC "urn:pubid:example.org:doctypes:dita:modules:xml:declarations"
"xmlDomain.mod"
>%xml-d-def;
<!ENTITY % ut-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Utilities Domain//EN"
"../../base/dtd/utilitiesDomain.mod"
>%ut-d-def;
<!ENTITY % indexing-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Indexing Domain//EN"
"../../base/dtd/indexingDomain.mod"
>%indexing-d-def;
<!ENTITY % abbrev-d-def
PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Abbreviated Form Domain//EN"
"abbreviateDomain.mod"
>%abbrev-d-def;
<!-- ================== End My Topic DTD ====================== -->
<!ENTITY % pre "pre
">
Which is just defining %pre; to be "pre", which is effectively doing nothing to the original definition of %pre;. However, it doesn't hurt to have it here and it gives you a ready place to add in any new domains you might integrate later. You can remove this declaration entirely if you want.