try {
// Bootstrap a runtime to get a populated registry
// FIXME needs to be tidied so we can get the registry without all of the other configuration
// that is being repeated below
ReallySmallRuntime runtime = new ReallySmallRuntime(Thread.currentThread().getContextClassLoader());
runtime.start();
ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
// Create model factories
modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);