and other PIs and comments to be output before the HTML root element.
<xsl:apply-imports/>
</xsl:param>
+ <xsl:call-template name="user.preroot"/>
+
<html>
<xsl:call-template name="html.head">
<xsl:with-param name="prev" select="$prev"/>
<!-- ============================================================ -->
+<xsl:template name="user.preroot">
+ <!-- Pre-root output, can be used to output comments and PIs. -->
+ <!-- This must not output any element content! -->
+</xsl:template>
+
<xsl:template name="user.head.content">
<xsl:param name="node" select="."/>
</xsl:template>
<xsl:template match="*" mode="process.root">
<xsl:variable name="doc" select="self::*"/>
+ <xsl:call-template name="user.preroot"/>
<xsl:call-template name="root.messages"/>
<html>
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="quiet" select="$chunk.quietly"/>
<xsl:with-param name="content">
+ <xsl:call-template name="user.preroot"/>
<html>
<head>
<xsl:call-template name="system.head.content"/>
<xsl:with-param name="filename" select="$filename"/>
<xsl:with-param name="quiet" select="$chunk.quietly"/>
<xsl:with-param name="content">
+ <xsl:call-template name="user.preroot"/>
<html>
<head>
<xsl:call-template name="system.head.content"/>