NamespaceMapping nsm = cndReader.getNamespaceMapping();
NamePathResolver resolver = new DefaultNamePathResolver(nsm);
// Put imported node type def back into CND form with CND writer
StringWriter sw = new StringWriter();
ValueFactory vf = new ValueFactoryQImpl(QValueFactoryImpl.getInstance(), resolver);
CompactNodeTypeDefWriter.write(ntdList1, nsm, resolver, vf, sw);
// Rerun the reader on the product of the writer
cndReader = new CompactNodeTypeDefReader(new StringReader(sw.toString()), TEST_FILE,
new QNodeTypeDefinitionsBuilderImpl());