Yes, you can modify the name attribute in an XML file using XDT (XML Document Transform) by specifying a transform rule in your configuration file, such as:
<Template name="TemplatePath" xdt:Transform="SetAttributes" xdt:Locator="Match(name)" name="TemplatePath1"/>