Actually you don't need to modify the OOTB files. In fact, it's a very bad idea, since Microsoft doesn't support modifying any of OOTB files in Layouts directory, except of DocIcon.xml.
Any cumulative update or SharePoint service pack can replace these files, so your customizations will vanish in one moment.
What you need to do, is to create your own file, deploy it to Layouts/Xsl or it's subfolder using SharePoint Mapped Folder approach:
Then, you should provide a link to it using XslLink property. It can be done programmatically.
And to achieve the GUI-enabled reusability, I would modify or create SPView instead of instantiating a detached webpart. That way, any user could deploy a list instance to a particular page and then set your customized view through the webpart settings.
The foundation behind that approach, is that SPView and XsltListViewWebPart in SharePoint 2010 are both representation of the same internal piece of data. And curiously, they share some properties, including Xsl, XslLink and ParameterBindings, so you can control XsltListViewWebPart through the corresponding list view object.
You can easily modify properties of SPView through the code, placing it in a feature event receiver.
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
var web = properties.Feature.Parent as SPWeb;
var list = web.GetList("/Lists/Test");
var view = list.DefaultView;
view.XslLink = "myfile.xslt";
view.Update();
}
And the last note, about the xslt file contents. Of course, you don't need to copy-past all the contents of OOTB files. Just reference them, using <xsl:import href="/_layouts/xsl/{filename}.xsl">
, and redefine particular templates.
For your convenience, here is an example of an xslt file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ddw1="http://schemas.microsoft.com/sharepoint/soap/"
xmlns:p1="deskwork" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.SharePoint.WebControls"
xmlns:ddwrt2="urn:frontpage:internal">
<xsl:import href="/_layouts/xsl/thread.xsl"/>
<!-- redefine templates here -->