|
RE: External DTD: msg#00098text.xml.xerces-c.user
Alberto, What does "setLoadExternalDTD(false)" provide me? From what I understand from the FAQ, this is an alternative to overloading the entity resolver. Thanks for the quick reply. Alex -----Original Message----- From: Alberto Massari [mailto:amassari@xxxxxxxxxxxxxx] Sent: Wednesday, December 27, 2006 9:02 AM To: c-users@xxxxxxxxxxxxxxxxx Subject: Re: External DTD Hi Alex, At 08.27 27/12/2006 -0500, Jacinto, Alex wrote: >Hello, > >I am trying to avoid the loading of external DTD. According to the >FAQ, I only need to: 1. Set my validation scheme to never >2. Set load external DTD to false > >Like so . . . > >parser->setValidationScheme (XercesDOMParser::Val_Never); >parser->setLoadExternalDTD (false); Even if the validation scheme is set to never, DTD will be processed to define the entities; and your internal DTD defines the NskBasicText.dtd entity that is later expanded to load the "../DTD/NskBasicText.dtd" file. If you want to prevent Xerces from loading those files too, you should create an entity resolver and return an empty content when requested (see the Redirect sample). >However, my parser still spit out an XMLPlatformException, a fatal >error with message: "Could not close the file" By chance, are you running on Solaris? This looks similar to http://issues.apache.org/jira/browse/XERCESC-1658 Alberto >I'm using 2.7 and here is a sample of xml file: > ><?xml version="1.0" encoding="UTF-8" ?> ><!DOCTYPE NewsML SYSTEM "../DTD/NewsMLv1.0.dtd" [<!ENTITY % >NskBasicText.dtd SYSTEM "../DTD/NskBasicText.dtd"> >%NskBasicText.dtd;]> > ><NewsML> ></NewsML> > >I do not have the mentioned DTD files in my local computer. > >Thanks in advance and happy holidays. > > >Alex |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: External DTD: 00098, Alberto Massari |
|---|---|
| Next by Date: | RE: External DTD: 00098, Alberto Massari |
| Previous by Thread: | Re: External DTDi: 00098, Alberto Massari |
| Next by Thread: | RE: External DTD: 00098, Alberto Massari |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |