Well, read the error message again: it says the opposite to what you want to do. If you want to use DTD file instead of XSD, you want to do something which is not accepted, according to this message. Perhaps you need to learn how to use XSD instead of DTD, which is easier, because XSD provides wider expressive capabilities then document type definition.
Lean about document type definition here: http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-prolog-dtd
Please pay attention that the DTD file is not a separate document and usually is not parsed separately from XML file. The "real" XML declaration is DOCTYPE, but it can be defined using one or more external entities
Learn using XML Schema starting from here:
], use links to W3 standards shown in this article.
You cannot get more specific answer as your information in your question is very limited.