// is the clearest solution.
// @todo refactor to avoid this
ClassLoader classLoader = this.getClass().getClassLoader();
Class implClass = classLoader.loadClass(
"com.volantis.mcs.xdime.XDIMEContentHandlerFactory");
AbstractContentHandlerFactory factory =
(AbstractContentHandlerFactory) implClass.newInstance();
String [] supportedNamespaces = factory.getHandledNamespaces();
for (int i = 0; i < supportedNamespaces.length; i++) {
String namespace = supportedNamespaces[i];
namespaceSwitchContentHandlerMap.addContentHandler(
namespace, factory);