You can't make the XML parser ignore the DTD entirely, but you can use an EntityResolver to make it use a different "dummy" DTD. The EntityResolver that most people use is the one that comes with Oasis catalogs.
If there's a namespace declaration missing, that's a much tougher problem. It means your document isn't well-formed XML, and Saxon (in fact, XSLT processors generally) can only handle well-formed XML input. There are many benefits in designing your application to use XML as the format for passing data from one component to another, and you lose all these benefits if you try to pass ill-formed XML. So you need to fix the root cause of this problem.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|