<xsl:template match="books">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Recommended Books</title>
</head>
<body>
<h1>The list of recommended books</h1>
<xsl:choose>
<xsl:when test="$groupByTechnology">
<xsl:for-each-group select="book" group-by="@technology">
<h2>
<xsl:value-of select="@technology"/>
</h2>
<hr/>
<table cellspacing="12px">
<xsl:apply-templates select="current-group()"/>
</table>
</xsl:for-each-group>
</xsl:when>
<xsl:otherwise>
<table cellspacing="12px">
<xsl:apply-templates select="book"/>
</table>
</xsl:otherwise>
</xsl:choose>
</body>
</html>
</xsl:template> |