cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulrich Mayring <u...@denic.de>
Subject Re: Header/Footer: how to separate in xsl
Date Fri, 23 Jun 2000 11:06:48 GMT
Hans-Guenter Stein wrote:
> 
> How could I separate headers and footers in my xsl-templates? My problem
> 
> is, that I cannot have a tag like "body" in an <xsl:template>, whithout
> closing it.
> 
> So how to do:
> 
> <xsl:template match="header">
>   <html>
>   <head>
>   </head>
>   <body>
> </xsl:template>
> 
> <xsl:template match="footer">
>   </body>
>   </html>
>  </xsl:template>

<xsl:template match="page">
	<html>
		<xsl:apply-templates select="header"/>
	<body>
		<xsl:apply-templates select="body"/>
		<xsl:apply-templates select="footer"/>
	</body>
	</html>
</xsl:template>

Alternatively you could also use <xsl:call-template name="header"/> if
you have no <header/> tag in your source XML.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Mime
View raw message