xml: allow either patch format to be created and applied auotmatically