}
private ExtensionRegistry cloneExtensionRegistry(AdditionalInitialization additionalInit) {
final ExtensionRegistry clone = new ExtensionRegistry(additionalInit.getProcessType(), new RunningModeControl(additionalInit.getExtensionRegistryRunningMode()));
for (String extension : extensionParsingRegistry.getExtensionModuleNames()) {
ExtensionParsingContext epc = clone.getExtensionParsingContext(extension, null);
for (Map.Entry<String, SubsystemInformation> entry : extensionParsingRegistry.getAvailableSubsystems(extension).entrySet()) {
for (String namespace : entry.getValue().getXMLNamespaces()) {
epc.setSubsystemXmlMapping(entry.getKey(), namespace, null);
}
}
for (String namespace : extensionParsingRegistry.getUnnamedNamespaces(extension)) {
epc.setSubsystemXmlMapping(namespace, null);
}
}
return clone;
}