handle xdi metadata when cloning or generating Demeter objects