* @return a OSGi aware entity resolver
*/
private EntityResolver createEntityResolver(BundleContext bundleContext, ClassLoader bundleClassLoader) {
Assert.notNull(bundleContext, "bundleContext is required");
// create local namespace resolver
EntityResolver localEntityResolver = new DelegatingEntityResolver(bundleClassLoader);
// hook in OSGi namespace resolver
EntityResolver osgiServiceEntityResolver = lookupEntityResolver(bundleContext, localEntityResolver);
DelegatedEntityResolver delegate = new DelegatedEntityResolver();
delegate.addEntityResolver(localEntityResolver, "LocalEntityResolver for bundle "