Q:

XSLT Master Page?

I am making a web application where the pages are xml and they use xslt style sheets to create the xhtml output.  
As a result a lot of the page layouts would be contained in the XSLT style sheet, in a sense the XSLT sheet contains all the common information about the page layouts, is it possible to create an asp.net masterpage for an xslt sheet??  Basically I'd have an aspx page generating xml and including another aspx page which is an xslt sheet using master pages to plug in whatever content changes on the page [the middle pane only].
Furthermore do you think this is a good design strategy?

A:

This is what I call the "Fill-in the blanks" technique, and yes, it is a very nice design pattern that allows to separate the presentation and processing logic separate, and to be able to have many different output formats without having to change the transformation.
Below is a complete and very short example of using this technique:
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>

 <xsl:param name="pMasterPage" select=
  "'file:///c:/temp/delete17.xml'"/>

 <xsl:variable name="vDoc" select="/"/>

 <xsl:template match="node()|@*">
  <xsl:param name="pInput"/>
  <xsl:copy>
   <xsl:apply-templates select="node()|@*">
    <xsl:with-param name="pInput" select="$pInput"/>
   </xsl:apply-templates>
  </xsl:copy>
 </xsl:template>

 <xsl:template match="/">
  <xsl:apply-templates select="document($pMasterPage)/*">
   <xsl:with-param name="pInput" select="$vDoc"/>
  </xsl:apply-templates>
 </xsl:template>

 <xsl:template match="first-name|last-name|age">
  <xsl:param name="pInput"/>
  <xsl:value-of select="$pInput/*/*[name()=name(current())]"/>
 </xsl:template>

</xsl:stylesheet>

When this transformation is applied on the following XML document:
<person>
 <first-name>John</first-name>
 <last-name>Smith</last-name>
 <age>23</age>
 <nationality>British</nationality>
</person>

and if the file: c:\temp\delete17.xml contains this:
<html>
 <h1>Person:</h1>

 <p>First Name: <first-name/></p>
 <p>Last Name: <last-name/></p>
 <p>Age: <age/></p>
</html>

then the following result is produced:
<html>
   <h1>Person:</h1>
   <p>First Name: John</p>
   <p>Last Name: Smith</p>
   <p>Age: 23</p>
</html>

displayed by the browser as:

Person:
First Name: John
Last Name: Smith
Age: 23

A:

I did this for a solution in a former life - more specifically I had someone do a fair chunk of it for me (-:
Fundamentally you only need two things, the XML and the XSLT - the rest is just plumbing and probably not needed. The XSLT is sufficient to do all the layout you want so its then just a question of wiring the XML to the page.
In terms of of the XSLT you've easily got the capability to do master page type stuff by use of includes and the content by using templates that get defined/overridden in the specific page type templates.
The approach we used was to use routing and some other elements of the early MVC stack - one bit pulled the XML, one bit pulled the XSLT, bit of code to wire them together and to push params into the XSLT and finally just push the resultant HTML out to the client. 
If you have a chase around you'll find various people have done interesting things by way of XML/XSLT view engines for MVC.
In terms of "is this a good approach" - well it worked very nicely for me for a client specific CMS (running off single geneated XML file) and fundamentally Umbraco was built on the same premise of using XSLT to render XML (although that's changing somewhat with the introduction of Razor to Umbraco). 

