@Override public InputSource resolveEntity(String publicId, String systemId) { if (systemId != null && systemId.endsWith("dtd")) { URL url = FileFuncs.getResource(RuntimeProperties.PACKAGE_DTD, true); if (url != null) { return new InputSource(url.toString()); } // if unable to find dtd in local fs, try getting it from web return new InputSource(RuntimeProperties.SCHEMA_LOC + RuntimeProperties.PACKAGE_DTD); } return null; }