title: How to Embed XSL into XML
body: <p>I am looking for a solution to embed XSL into XML so there is only 1 XML file that is sent to the browser. I tried the solution proposed by Dimitre Novatchev here: <a href="https://stackoverflow.com/questions/360628/embed-xsl-into-an-xml-file/15121012#15121012">Embed xsl into an XML file</a></p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:output omit-xml-declaration="yes"/&gt;    &lt;xsl:variable name="vEmbDoc"&gt;
      &lt;doc&gt;
          &lt;head&gt;&lt;/head&gt;
          &lt;body&gt;
              &lt;para id="foo"&gt;Hello I am foo&lt;/para&gt;
          &lt;/body&gt;
      &lt;/doc&gt;
  &lt;/xsl:variable&gt;
  &lt;xsl:template match="para"&gt;
    &lt;h1&gt;&lt;xsl:value-of select="."/&gt;&lt;/h1&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="xsl:template"/&gt;&lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>The problem is that with this solution I can not find a way to include style element inside the head. Seems like in the proposed solution head and body tags do not have any effect since the browser will add them automatically during parsing and the solution works even without having those tags included.</p>
  
  <p>So the question is: How to include style element in the head in the above mentioned solution that will look like this:</p>
  
  <pre><code>&lt;head&gt;&lt;style&gt;body {font-size:10pt;padding:20pt} &lt;/style&gt;&lt;/head&gt;
  </code></pre>