} catch (NameException e) {
throw new RepositoryException("Illegal JCR name", e);
}
} else if (contentType.equalsIgnoreCase(TEXT_X_JCR_CND)) {
try {
NamespaceMapping mapping = new NamespaceMapping(context.getSessionImpl());
CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping> reader =
new CompactNodeTypeDefReader<QNodeTypeDefinition, NamespaceMapping>(
new InputStreamReader(in), "cnd input stream", mapping,
new QDefinitionBuilderFactory());
namespaceMap.putAll(mapping.getPrefixToURIMapping());
for (QNodeTypeDefinition ntDef: reader.getNodeTypeDefinitions()) {
nodeTypeDefs.add(ntDef);
}
} catch (ParseException e) {
IOException e2 = new IOException(e.getMessage());