from datetime import datetime def custom_key(index): return f"INV-datetime.now().strftime('%Y%m%d')-index:05d"

Automatically detect key , ID , IDREF , or unique constraints from XML schema.