A domain specialization often defines phrase-level element types, as opposed to a
topic specialization, which defines a whole new hierarchy of elements. The XML Mention
domain is a commonly-mentioned domain, used as an example of integrating a domain
specialization.
Suppose you have created a domain specialization, Emphasis, that includes a new
element, <em>
for use when marking text your users want to
stress. This specialization includes the two files:
emphasisDomain.mod and
emphasisDomain.ent .
The specialization does not include a DTD file because it is a domain specialization.
A domain specialization never includes a DTD because it cannot be used on its own,
unlike topic type specializations.
To integrate an emphasisDomain specialization:
Add emphasisDomain.mod and
emphasisDomain.ent to the dtd
subfolder of your DTD plugin.
Check out and open CompanyDitabase.dtd .
In the DOMAIN ENTITY DECLARATIONS section, add the identified lines.
<!ENTITY % emphasis-d-dec
PUBLIC "-//COMPANY//ENTITIES Emphasis Domain//EN"
"emphasisDomain.ent"
>
%emphasis-d-dec;
In the DOMAIN EXTENSIONS section, edit the keyword
entity to
include emphasis-d-keyword
.
<!ENTITY % keyword "keyword |
%pr-d-keyword; |
%sw-d-keyword; |
%ui-d-keyword; |
%emphasis-d-keyword;
">
In the DOMAINS ATTRIBUTE OVERRIDE section, edit the
included-domains
entity to reference
&emphasis-d-att
.
<!ENTITY included-domains
"&concept-att;
&glossentry-att;
&glossgroup-att;
&reference-att;
&task-att;
&hi-d-att;
&ut-d-att;
&indexing-d-att;
&hazard-d-att;
&abbrev-d-att;
&pr-d-att;
&sw-d-att;
&ui-d-att;
&taskbody-constraints;
&localization-loc-d-att;
&emphasis-d-att;
"
>
In the DOMAIN ELEMENT INTEGRATION section, add the identified lines.
<!ENTITY % emphasis-d-def
PUBLIC "-//COMPANY//ELEMENTS Emphasis Domain//EN"
"emphasisDomain.mod"
>
%emphasis-d-def;
Save, close, and check in CompanyDitabase.dtd .
Check out and open your DTD plugin's catalog.xml .
Within the group that includes CompanyDitabase.dtd , add the public identifiers for the emphasisDomain.mod and emphasisDomain.ent files.
<group>
<!-- Topics -->
<public publicId="-//COMPANY//DTD DITA Composite//EN" uri="dtd/CompanyDitabase.dtd"/>
...
<!-- Company Emphasis domain -->
<public publicId="-//COMPANY//ELEMENTS Emphasis Domain//EN" uri="dtd/emphasisDomain.mod"/>
<public publicId="-//COMPANY//ENTITIES Emphasis Domain//EN" uri="dtd/emphasisDomain.ent"/>
</group>
Save, close, and check in catalog.xml
Restart the IXIA CCMS Desktop .
To add the specialization to IXIA CCMS Output Generator , take the
following actions:
Copy the entire com.company.dtd plugin folder into
the %OutputGenDir%/data/%OT_Dir%/plugins folder,
overwriting the existing copy.
Note: Depending on your CCMS Output Generator configuration, the
DITA-OT path might vary.
Run the integrator to integrate the plugin.
Review your work. It should resemble the figure below.
Figure: Example emphasisDomain.mod file
<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================= -->
<!-- HEADER -->
<!-- ============================================================ -->
<!-- MODULE: DITA Emphasis Domain -->
<!-- VERSION: 1.3 -->
<!-- DATE: October 2016 -->
<!-- -->
<!-- ============================================================ -->
<!-- ============================================================= -->
<!-- PUBLIC DOCUMENT TYPE DEFINITION -->
<!-- TYPICAL INVOCATION -->
<!-- -->
<!-- Refer to this file by the following public identifier or an
appropriate system identifier
PUBLIC "-//COMPANY//ELEMENTS Emphasis Domain//EN"
Delivered as file "emphasisDomain.mod" -->
<!-- ============================================================= -->
<!-- ELEMENT NAME ENTITIES -->
<!-- ============================================================= -->
<!ENTITY % em "em" >
<!-- ============================================================= -->
<!-- ELEMENT DECLARATIONS -->
<!-- ============================================================= -->
<!-- LONG NAME: Emphasis name -->
<!ENTITY % em.content
"(#PCDATA |
%draft-comment; |
%required-cleanup; |
%text;)*"
>
<!ENTITY % em.attributes
"%univ-atts;
outputclass
CDATA
#IMPLIED"
>
<!ELEMENT em %em.content;>
<!ATTLIST em %em.attributes;>
<!-- ============================================================= -->
<!-- SPECIALIZATION ATTRIBUTE DECLARATIONS -->
<!-- ============================================================= -->
<!ATTLIST em %global-atts; class CDATA "+ topic/keyword emphasis-d/em ">
<!-- ================= End of DITA Emphasis Domain =============== -->
The emphasis domain specialization is ready, and your users can now add the
<em>
element to content in any context where users can
add <keyword>
.
Tip: You also need to add templates and CSS or
attribute sets to your output plugins to properly format text in the
<em>
element.