On Thu, 2002-11-28 at 16:59, Simon Kitching wrote: > Hi, > > You may find the following email useful: > > > http://xml.apache.org/xerces2-j/features.html > > esp.feature > "http://apache.org/xml/features/nonvalidating/load-external-dtd." > > NB: I haven't tried this myself. I use an alternate approach where I > register an EntityResolver and return an empty DTD. > > For some background info, you may find Glenn's comments here useful: > http://marc.theaimsgroup.com/?l=xerces-j-user&m=103728668825453&w=2 > > Regards, > > Simon
Thanks Simon, I went with your alternate approach actually, and it worked like a charm. Thanks again. Scott > > On Fri, 2002-11-29 at 13:48, J. Scott Amort wrote: > > I'm using JAXP 1.2 and the latest Xerces-J (2.2.1). I have: > > > > factory.setValidating(false); > > > > Where factory is my DocumentBuilderFactory. However, the XML file does > > have a !DOCTYPE header containing a reference to a DTD, and > > standalone=no. The parser seems to try to find this DTD, even though I > > don't want it to validate. And when it can't find it, I get a "no > > protocol: //somedtd.dtd" error. How can I prevent this? > > > > My application will use XML files generated by another app which > > includes a local DTD reference. However, my app may or may not be run > > on the same computer as that DTD, so I don't want it to look for it (but > > I can't alter how that app writes its XML files). I hope this is > > somewhat clear. Thanks for any help. > > > > Scott > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] -- J. Scott Amort <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
