[xsl] for-each question

Subject: [xsl] for-each question
From: Holmberg Rick-ra0119 <Rick.Holmberg@xxxxxxxxxxxx>
Date: Mon, 12 Aug 2002 16:56:44 -0700
I am new to Xsl and am trying to parse a xml document into a html doc.  I would like to have a heading above several elements but don't want that heading to show up above each element.  I am sure this is simple but I can't seem to quite get it.  Here is what I have.
If my xml file looks like this
<?xml version="1.0" encoding="UTF-8"?>
I would like the html to read
The Books are:
My Stylesheet segment is:
<xsl:stylesheet version="1.0"
<xsl:output omit-xml-declaration="yes"/>             
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:template match="book">
The Books are:
<xsl:apply-templates select="book" />
With this XSL file I am getting the 'The Books are:' printed 3 times.  I only need it once.  I figure I have to use a for-each but I can't seem to get that to work correctly.  Can anyone help here?

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread