In PHP, I am trying to validate an XML document using a DTD specified by my application - not by the externally fetched XML document. The validate method in the DOMDocument class seems to only validate using the DTD specified by the XML document itself, so this will not work.
Can this be done, and how, or do I have to translate my DTD to an XML schema so I can use the schemaValidate method?
(this seems to have been asked in http://stackoverflow.com/questions/101935/validate-xml-using-a-custom-dtd-in-php but without correct answer, since the solution only relies on DTD speicified by the target XML)