Add new constraint to generation of Document