for (int i=0; i<dtds.length; i++) {
if (systemId.equals(dtds[i])) {
// return a local copy
try {
String dtdFile =
systemId.substring(systemId.lastIndexOf('/"));
// includes the /
return new InputSource(
new FileReader(DTDDIR + dtdFile));
} catch (IOException ex) {
System.err.println("+================================+");
System.err.println("DTD ERROR: " + ex.toString());
System.err.println("... Trying to get from web...");
System.err.println("+================================+");
return null;
}
}
}
// Not matched any of the ones in the array.
return null;