Step 2-2. Create New Document Type Shell DTD
In the base DITA distribution, find the file concept.dtd, copy it into the faq-question/dtd directory, and rename it faq-question.dtd (in the sample materials this file is named faq-question-v1.dtd).
- Delete the header comments and replace them with comments that indicate this document type shell DTD is owned by you and is specific to the FAQ question module.
- Remove any references to any domain modules and entity files you don't need. Which ones you need is entirely your decision—if the FAQ is about a software product you may, in fact, need the software and UI domains. For simplicity you can leave all those declarations alone for now and worry about them later (or let the users of your module worry about it). In the tutorial materials I've used only the highlight and utility domains within this shell.
- Find the parameter entity named
%concept-info-types;
and rename it to%faq-question-info-types;
. Set its replacement text to "no-topic-nesting," instead of "%info-types;."The<no-topic-nesting>
element is one of the DITA "specialization" element types that exist to work around limitations in DTD syntax. In particular, if you have a content model declared like so:(%some-parameter-entity;)
You cannot simply set%some-parameter-entity;
to an empty string, because the resolved result would be:()
which is not valid.The solution is to define an empty element type that acts as a placeholder, thus
<no-topic-nesting>
.
Try validating or opening the test document again. This time, instead of getting an error like "DTD not found," you should get errors like "element type 'faq-question' not declared," indicating that the validator found the DTD, but could not find the declarations for the FAQ-specific element types, which of course we haven't created yet. But we're making progress.