This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: header/footer: How to to separate html-tag in to different xsl-template rules?
- To: xsl-list at mulberrytech dot com
- Subject: Re: header/footer: How to to separate html-tag in to different xsl-template rules?
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Fri, 23 Jun 2000 09:41:48 -0400
- CC: Hans-Guenter Stein <Hans-Guenter dot Stein at siteos dot de>
- Organization: Department of Engineering Science, The University of Auckland
- References: <39531AB9.E3EFFBBD@siteos.de>
- Reply-To: xsl-list at mulberrytech dot com
Hans-Guenter Stein wrote:
>
> My problem
> is, that I cannot have a tag like "body" in an <xsl:template>, whithout
> closing it.
Can you step back up a level?
<xsl:template match="/">
<html>
<head>
<xsl:apply-templates select="header" mode="title" />
</head>
<body>
<xsl:apply-templates select="header" mode="h1" />
<xsl:apply-templates select="content" />
<xsl:apply-templates select="footer" />
</body>
</html>
</xsl:template>
The problems that you're seeing generally indicate a non-hierarchical
input format, or a grouping of information that doesn't match your
output format. You can either re-design your input format (for the above
example you might split "title" info from "h1" info), or just deal
with it in the XSL using something like the example above.
Hope this helps.
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list