Step 2-1. Create Test Case Document Instance
In your working area create a directory named faq-question and under that create the directory dtd. This will hold all the DTD-related materials for the topic specialization. You should create this directory outside the scope of the DITA Open Toolkit. (In the tutorial materials there are two directories, faq-question-v1 and faq-question. The faq-question-v1 directory contains the first iteration of the module, the faq-question directory contains the final, refined version.)
<?xml version="1.0"?> <!DOCTYPE faq-question SYSTEM "dtd/faq-question.dtd"> <faq-question id="question-id"> <faq-question-statement>Can I add attributes to specific element types?</faq-question-statement> <faq-answer > <p>No, you can only define global attributes, specialized either from <base> or @props.</p> </faq-answer> </faq-question>
Note that the SYSTEM ID of the DTD is a local, relative URL. This is to keep things simple for testing purposes and to avoid the added complexity of mapping PUBLIC or SYSTEM IDs through catalogs. Later we will set up the necessary catalog entries so documents can use an absolute URI for the faq-question shell DTD.
Open this document in an XML-aware editor. It should either fail to open with a "can't find the DTD" message or open but say that it can't be validated. Now our goal is to make this file validate.