xml_name_type should probably take &str