Table of contents
<xsl:template match="catalog">
<head>
<title><xsl:value-of select="title"/></title>
</head>
<body>
<h1><xsl:value-of select="title"/></h1>
<ul>
<xsl:for-each select="composition/name">
<li>
<a>
<xsl:attribute name="href">#<xsl:value-of select="translate(string(.), ' ', '')"/></xsl:attribute>
<xsl:value-of select="."/>
</a>
</li>
</xsl:for-each>
</ul>
<hr/>
<xsl:apply-templates select="composition">
<xsl:sort select="composer/last_name"/>
<xsl:sort select="composer/first_name"/>
<xsl:sort select="composer/middle_name"/>
<xsl:sort select="name"/>
</xsl:apply-templates>
<hr/>
Copyright <xsl:value-of select="copyright"/><br/>
Last Modified: <xsl:value-of select="last_updated"/><br/>
<xsl:apply-templates select="maintainer"/>
</body>
</xsl:template>
<xsl:template match="composition">
<h3>
<xsl:number value="position()"/>.
<a>
<xsl:attribute name="name"><xsl:value-of select="translate(string(name), ' ', '')"/></xsl:attribute>
<xsl:value-of select="name"/>
by <xsl:value-of select="composer"/>
</a>
</h3>
<ul>
<xsl:if test="string(date)">
<!-- not Y10K safe! -->
<li><xsl:value-of select="substring(date,2,4)"/></li>
</xsl:if>
<xsl:if test="string(length)">
<li><xsl:value-of select="length"/></li>
</xsl:if>
<xsl:if test="string(instruments)">
<li><xsl:value-of select="instruments"/></li>
</xsl:if>
<xsl:if test="string(publisher)">
<li><xsl:value-of select="publisher"/></li>
</xsl:if>
</ul>
<p><xsl:value-of select="description"/></p>
</xsl:template>
View Transformed Document in Netscape