class ClassLoaderEntityResolver implements EntityResolver {

	@Override
	public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {

		if (log.isDebugEnabled()) log.debug("Resolving publicId [" + publicId +"] systemId [" + systemId +"] classloader ["+classLoader+"]");
		Resource resource = Resource.getResource(classLoader, systemId);
		if(resource != null) {
			return resource.asInputSource();
		}
		// If nothing found, null is returned, for normal processing
		return null;
	}

	public  ClassLoaderEntityResolver(ClassLoader classLoader);
	public  ClassLoaderEntityResolver(Resource resource);

}