<?xml-stylesheet?> Instruction Syntax

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet ...?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
   ...
</html>
Rules for coding the xml-stylesheet instruction for HTML 5

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

Style Sheet and Templates

<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns="http://www.w3.org/1999/xhtml"
   exclude-result-prefixes="xsl html"
>
   <xsl:output method="html" version="1.0"
      omit-xml-declaration="no"
      doctype-system="about:legacy-compat"
   />

<!-- This is the "Fix for IE" based on the example in W3C's FAQs:
   http://www.w3.org/MarkUp/2004/xhtml-faq#ie
-->

   <xsl:template match="/html:html/html:body">
      <xsl:copy>
         <xsl:apply-templates select="@*"/>
         <p><#Template header code goes here.#></p>
         <xsl:apply-templates select="node()"/>
         <p><#Template footer code goes here.#></p>
      </xsl:copy>
   </xsl:template>

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

</xsl:stylesheet>
Rules for coding the style sheet and site templates