Saxon calls on the services of an underlying XML parser to parse the source document, and if a source document references a DTD, the XML parser will generally try to retrieve it (it has to do this even when non-validating, to resolve entity references). Depending on the XML parser you are using, there may be Java system properties to change this behaviour. The way most people do it is to configure an EntityResolver that returns a dummy DTD in place of the real one. But this is all really a question about the XML parser, not about Saxon.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of timothymarc@freenet.de
Sent: 21 February 2008 09:30
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Ignoring DTD in XML document

Hi all,

I have a question to the creation of an DocumentInfo with SAxon-B 8.9. In my workflow, i'll get an xmlstring as input stream and i want to create a DocumentInfo for XSLT processing. The problem is, that in the xml-string a DTD is mentionend, wich is both not created and not reachable for me.

Saxon allways fails while building the DocumentInfo, because the DTD is not present. So, there must be the possibility for me, to switch of Saxons automatically DTD-checking behaviour. Is that possible?

Thanks a lot
Timothy