Attribute Specialization Step 2: Integrate With Document Type Shell

Step 2 is to integrate the vocabulary module into your local copy of each of your document type shells. The pattern is the same for each shell.

For this tutorial, use a copy of the concept.dtd shell, as for the element domain specialization tutorial.

Edit the copy of concept.dtd and find the comment that reads "DOMAIN ATTRIBUTE DECLARATIONS". Following that comment, add this declaration:
<!ENTITY % phase-of-moon-d-dec     
  SYSTEM "phase-of-moonAttDomain.ent"                                                

This pulls in the attribute domain module.

Find the comment that reads "DOMAIN ATTRIBUTE EXTENSIONS". Following that comment you should see a declaration for the %props-attribute-extensions; parameter entity. It will probably be declared as an empty string.

Modify the entity replacement text (the bit inside the double quotes) to include a reference to the %phase-of-moon-d-attribute; parameter entity:
<!ENTITY % props-attribute-extensions  

This adds the @phase-of-moon attribute to the %selection-atts; parameter entity which is then included in the %univ-atts; parameter entity, making this new attribute available on most elements (some elements, such as title, are not selection candidates).

Find the comment that reads "DOMAINS ATTRIBUTE OVERRIDE". Following that you should see the declaration of the text entity &included-domains; and it should include references to a number of "x-d" text entities.

To this entity add a reference to the &phase-of-moon-d-att; text entity:
<!ENTITY included-domains 

This formally declares your @props attribute specialization so that DITA processors will know that @phase-of-moon is in fact a conditional attribute and that they should filter on it as appropriate.

Note: Note the difference between parameter entities, which start with "%", and general entities, which start with "&". Parameter entities are used within DTD declarations. Text entities are used within document content. Because the "included-domains" entity is contributing to the value of an attribute it is a general entity, not a parameter entity, and the entities used to build up its value are also general entities, not parameter entities.

That's all there is to it. Now just repeat Step 2 for each document type shell you use and you're done.

Tip: Common mistakes to watch out for: