Step 2-6. Declare FAQ Question @class Attributes

In the faq-question.mod file, find the comment with the text "SPECIALIZATION ATTRIBUTE DECLARATIONS."

Edit the declarations within this section as follows:
  • For the <concept> element's declaration, change the element type name to "faq-question" and add " faq-question/faq-question " to the @class attribute value.
  • For the <conbody> element's declaration, change the element type name to "faq-answer" and add " faq-question/faq-answer " to the end of the @class attribute value.
  • Copy one of the declarations and change the element type name to "faq-question-statement" and change the @class attribute value to "- topic/title faq-question/faq-question-statement " (remember the trailing space character at the end of the @class value).
The specialization attribute declarations section should now look like this:
<!-- ============================================================= -->
<!--                    SPECIALIZATION ATTRIBUTE DECLARATIONS      -->
<!-- ============================================================= -->

<!ATTLIST faq-question           %global-atts;  class CDATA "- topic/topic concept/concept faq-question/faq-question ">
<!ATTLIST faq-answer             %global-atts;  class CDATA "- topic/body  concept/conbody faq-question/faq-answer ">
<!ATTLIST faq-question-statement %global-atts;  class CDATA "- topic/title concept/title   faq-question/faq-question-statement ">  

Validate the test document to check that you didn't introduce any syntax errors. You can also use your editor to test that the elements now allow @class attributes with the expected default values.

If you are using an editor like OxygenXML, as soon as you add the @class attributes to the module it should recognize the document as a DITA topic and automatically format it appropriately in the tags-off mode (Author mode in OxygenXML).

The @class attribute is sufficient for DITA processors to recognize the elements as DITA elements, but the declaration is not quite complete. We still need to set up the @domains attribute for this specialization.