@domains
attribute text entity in the &included-domains;
text entity declaration.catalog_dita.xml
file that is in the Open Toolkit's top-level directory.softwareDomain.ent
has these declarations:<!ENTITY % sw-d-pre "msgblock " > <!ENTITY % sw-d-ph "filepath | msgph | systemoutput | userinput " > <!ENTITY % sw-d-keyword "cmdname | msgnum | varname " >
Reflecting the fact that the software domain specializes from <pre>
, <ph>
, and <keyword>
.
@domains
attribute text entity, which should be named "domainShortName-d-att", e.g., "sw-d-att". This should also be declared in the .ent file for the domain. For the software domain it looks like this:<!-- ============================================================= --> <!-- DOMAIN ENTITY DECLARATION --> <!-- ============================================================= --> <!ENTITY sw-d-att "(topic sw-d)" >
%xml-d-keyword;
&xml-d-att;
%hi-d-dec;
parameter entity. Copy it and paste a new copy into myTopic.dtd
immediately after the original:... <!-- ============================================================= --> <!-- DOMAIN ENTITY DECLARATIONS --> <!-- ============================================================= --> <!ENTITY % hi-d-dec PUBLIC "-//OASIS//ENTITIES DITA 1.2 Highlight Domain//EN" "../../base/dtd/highlightDomain.ent" >%hi-d-dec; <!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 "-//OASIS//ENTITIES DITA 1.2 Highlight Domain//EN" "../../base/dtd/highlightDomain.ent" >%xml-d-dec;
<!ENTITY % xml-d-dec PUBLIC "urn:pubid:example.org:doctypes:dita:modules:xml:entities" "../../base/dtd/highlightDomain.ent" >%xml-d-dec;
<!ENTITY % xml-d-dec PUBLIC "urn:pubid:example.org:doctypes:dita:modules:xml:entities" "xmlDomain.ent" >%xml-d-dec;
%xml-d-keyword;
parameter entity to the declaration of the %keyword;
parameter entity:... <!-- ============================================================= --> <!-- 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; "> ...
Note the leading "|" character added after "keyword " in the original declaration. This parameter entity is used to build up an OR group of element type names, so you need to add the "|" (OR) connector between "keyword" and "%xml-d-keyword;".
&included-domains;
text entity. Add a reference to the &xml-d-att;
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; &abbrev-d-att; &xml-d-att; " > ...
%hi-d-def;
parameter entity. Copy it and paste a new copy immediately after the original:... <!-- ============================================================= --> <!-- DOMAIN ELEMENT INTEGRATION --> <!-- ============================================================= --> <!ENTITY % hi-d-def PUBLIC "-//OASIS//ELEMENTS DITA 1.2 Highlight Domain//EN" "../../base/dtd/highlightDomain.mod" >%hi-d-def; <!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 "-//OASIS//ELEMENTS DITA 1.2 Highlight Domain//EN" "../../base/dtd/highlightDomain.mod" >%xml-d-def;
xmlDomain.mod
:<!ENTITY % xml-d-def PUBLIC "urn:pubid:example.org:doctypes:dita:modules:xml:declarations" "../../base/dtd/highlightDomain.mod" >%xml-d-def;
<!ENTITY % xml-d-def PUBLIC "urn:pubid:example.org:doctypes:dita:modules:xml:declarations" "xmlDomain.mod" >%xml-d-def;
If the document validates, see if you can enter any of the element types from the domain, such as <xmlelem>
or <xmlatt>
, into a paragraph. You should be able to.
That's it, you're done. You've successfully created a new topic type shell that removes domains you don't want and adds a new domain you do want.
It should be clear from following this tutorial that creating document type shells is an entirely mechanical process and that once you've done it once or twice it becomes very easy and quick.
This tutorial did not show how to package your new shell as a Toolkit plugin. For that, see Packaging Document Type Shells and Vocabulary Modules as Toolkit Plugins.
This tutorial shows how to create a topic type shell. Creating map type shells is exactly the same.