I got it now...
you were asking if it was a good idea to put the contents of the DTD in an XML file...
Ok then. A good practice is to have a separate file for the DTD which you can then reference in your XML document and serves validation purposes.
Putting the content of the DTD within the XML file is not very elegant and moreover there is no way to reuse that DTD code for another XML document.
Imagine you want to write a DTD specifying the syntax of an XML document which stores different kinds of book libraries. You want to store, say, the title, the author and the ISBN of the books but you want to have a separate XML file for each topic (Sci-fi, Romans,Comics,...). Then
you should definitely have a separate DTD that you reference inside each XML file, otherwise the maintenance of your DTD would be a nightmare when the number of XML files grows... I've never seen DTD written directly inside an XML file...
Anyone any insights about this ?
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform