// load name and ns index
FileSystemResource nsFile = new FileSystemResource(context.getFileSystem(), RES_NS_INDEX);
if (nsFile.exists()) {
nsIndex = new HashMapIndex(nsFile);
} else {
nsIndex = new NamespaceIndex((NamespaceRegistryImpl) context.getNamespaceRegistry());
}
}
return nsIndex;
} catch (Exception e) {
throw new IllegalStateException("Unable to create nsIndex." + e);