Example attribute specialization: Color base attribute

An attribute specialization is the least complex of the three specializations. For an attribute specialization, you typically specialize from either the base or props attributes.

Suppose you need to integrate specialized attributes from the base attribute into CCMS Desktop, such as adding color to code samples. To accomplish this, you already specialized a color attribute from the existing base attribute in a file named companyAttDomain.ent, which is included as an appendix, and you use the same CompanyDitabase.dtd filename you have in other exercises.

To integrate an attribute specialization for the color base attribute:

  1. Copy companyAttDomain.ent into the dtd subfolder of your DTD plugin.
  2. Check out and open CompanyDitabase.dtd.
  3. Scroll to the DOMAIN ATTRIBUTE DECLARATIONS section.
  4. Add an entity definition similar to the following to that section:
    <!ENTITY % company-d-dec
      PUBLIC "-//COMPANY//ENTITIES DITA Company Attribute Domain//EN" 
             "companyAttDomain.ent"
    >%company-d-dec;

    Where:

    • The public identifier matches the one you assigned in companyAttDomain.ent
    • The system identifier matches the file name
      Note: Because companyAttDomain.ent lives in the same folder as CompanyDitabase.dtd, the system identifier path is flat.
  5. Scroll to the DOMAIN ATTRIBUTE EXTENSIONS section.
  6. Edit the base-attribute-extensions entity to include color-d-attribute, which defines your new attribute in companyAttDomain.ent.
    <!ENTITY % base-attribute-extensions 
               "%localization-loc-d-attribute;
                %color-d-attribute;"                                     >
  7. Locate the DOMAINS ATTRIBUTE OVERRIDE section.
  8. Add the color-d-att entity to the list of included domains.
    <!ENTITY included-domains 
                              "&concept-att;
                               &glossentry-att;
                               &glossgroup-att;
                               &reference-att;
                               ...
                               &equation-d-att;
                               &localization-loc-d-att;
                               &xml-d-att;
                               &color-d-att;
      "
    >
  9. Save, close, and check in CompanyDitabase.dtd.
    Note: You do not need to make any changes to catalog.xml.
  10. Restart CCMS Desktop.
  11. To add the specialization to IXIA CCMS Output Generator, take the following actions:
    1. 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.
    2. Run the integrator to integrate the plugin.
The color base attribute is ready for users to apply to content.