throws SAXException, IOException { InputSource is = resolver.resolveEntity(publicId, systemId);   if (is == null) { if (publicId != null) return null; URL url = new URL(systemId); if (url.getProtocol().equals("file")) { String path = url.getPath(); File f = new File(path); if (!f.canRead()) return resolver.resolveEntity(null, f.getName()); else return new InputSource(f.getAbsolutePath()); } else return new InputSource(url.openStream()); } return is; }
throws SAXException, IOException {   LOG.debug("Resolve publicId='"+publicId+"', systemId='"+systemId+"'.");  InputSource is = resolver.resolveEntity(publicId, systemId);   if (is == null) { if (publicId != null) return null; URL url = new URL(systemId); if (url.getProtocol().equals("file")) { String path = url.getPath(); File f = new File(path); if (!f.canRead()) return resolver.resolveEntity(null, f.getName()); else return new InputSource(f.getAbsolutePath()); } else return new InputSource(url.openStream()); } return is; }
	public InputSource resolveEntity(String publicId, String systemId)			throws SAXException, IOException {		InputSource is = resolver.resolveEntity(publicId, systemId);		// if resolution failed and publicId == null,		// try to make absolute file names relative and retry		if (is == null) {			if (publicId != null)				return null;			URL url = new URL(systemId);			if (url.getProtocol().equals("file")) {				String path = url.getPath();				File f = new File(path);				if (!f.canRead())					return resolver.resolveEntity(null, f.getName());				else					return new InputSource(f.getAbsolutePath());			} else				return new InputSource(url.openStream());		}		return is;	}