src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java
Print this page
@@ -673,12 +673,10 @@
SAXParserFactory spf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(true);
try {
reader = spf.newSAXParser().getXMLReader();
- reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
- fComponentManager.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
// If this is a Xerces SAX parser, set the security manager if there is one
if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) {
SecurityManager securityManager = (SecurityManager) fComponentManager.getProperty(SECURITY_MANAGER);
if (securityManager != null) {
try {
@@ -685,13 +683,18 @@
reader.setProperty(SECURITY_MANAGER, securityManager);
}
// Ignore the exception if the security manager cannot be set.
catch (SAXException exc) {}
}
+ try {
reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
fComponentManager.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
+ } catch (SAXException exc) {
+ System.err.println("Warning: " + reader.getClass().getName() + ": " +
+ exc.getMessage());
}
+ }
} catch( Exception e ) {
// this is impossible, but better safe than sorry
throw new FactoryConfigurationError(e);
}
}