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