In CMLFormat::WriteMolecule() we have:
if(!isalpha(name[0]))
name = "id" + name;
xmlTextWriterWriteAttribute(writer(), C_ID, BAD_CAST name.c_str());
if(!isalpha(name[0]))
{ ... write <name> }
The name element will never show up in CML output. IMHO the name element should always be written, at least a given name from CML input should be reproduced in the output. Why not just remove the condition?!
I agree. This is a programming error. The second if statement should be removed.