diff --git a/src/main/webapp/stylesheets/extractbody.xsl b/src/main/webapp/stylesheets/extractbody.xsl index e2635aa81d1dd5d7c685996bb58d62abc62a8cb3..7bad9ba0dbc8405099668841c0a6cf0e620c7bae 100644 --- a/src/main/webapp/stylesheets/extractbody.xsl +++ b/src/main/webapp/stylesheets/extractbody.xsl @@ -14,13 +14,18 @@ <xsl:output method="xhtml" omit-xml-declaration="yes" indent="no"/> <xsl:param name="extraclass"/> +<xsl:template match="node()|@*"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> +</xsl:template> <xsl:template match="/"> <xsl:choose> <xsl:when test="//body"> <div class="body {$extraclass}"> <xsl:apply-templates select="//style"/> - <xsl:copy-of select="//body/*"/> + <xsl:apply-templates/> </div> </xsl:when> <xsl:otherwise> @@ -29,6 +34,10 @@ </xsl:choose> </xsl:template> +<xsl:template match="html"> + <xsl:apply-templates select="body/*"/> +</xsl:template> + <xsl:template match="style"> <xsl:copy> <xsl:copy-of select="@*"/>