XDS provide and register: externalized source id. tweaked the document id generation.