<xsl:param name="path_to_top" select="'.'"/>
<xsl:param name="current-date"/>
+<xsl:param name="make_header" select="true()"/>
+<!--CSC: The following mess is due to a bug of xsltproc w.r.t. patterns
+ precedence: the less general pattern is sometimes applied ;-( -->
<xsl:template match="html">
+ <xsl:call-template name="html"/>
+</xsl:template>
+
+<xsl:template name="html">
<html>
<head>
<title><xsl:value-of select="head/title"/></title>
<link rel="stylesheet" href="{$path_to_top}/../style/mowgli.css" type="text/css"/>
</head>
<body>
- <xsl:call-template name="head">
- <xsl:with-param name="path_to_top" select="$path_to_top"/>
- </xsl:call-template>
- <xsl:apply-templates select="body/node()"/>
+ <xsl:if test="$make_header">
+ <xsl:call-template name="head">
+ <xsl:with-param name="path_to_top" select="$path_to_top"/>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:apply-templates select="*[2]/node()"/>
<xsl:call-template name="foot">
<xsl:with-param name="path_to_top" select="$path_to_top"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="*|text()|@*">
- <xsl:copy>
- <xsl:apply-templates select="*|text()|@*"/>
- </xsl:copy>
+ <xsl:choose>
+ <xsl:when test="name(.) = 'html'">
+ <xsl:call-template name="html"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy>
+ <xsl:apply-templates select="*|text()|@*"/>
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<xsl:template match="mowgli:latest-news">