<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:fn="http://www.w3.org/2005/02/xpath-function">

<xsl:template match="/">
	<xsl:apply-templates />
</xsl:template>

<xsl:template match="comics">
	<html>
		<head>
			<link rel="stylesheet" type="text/css" href="schizo.css"/>
			<title>Favorite Webcomics -- Adam Chlipala</title>
		</head>

		<body>
			<center><img src="img/comicsT.png" alt="My favorite webcomics" width="675" height="160"/></center>
			<br/>

			<xsl:for-each select="section">
				<div class="project">
					<h2><xsl:value-of select="@title"/></h2>

					<table><tr><th></th> <th>Comic</th> <th>RSS</th></tr>
					<xsl:apply-templates />
					</table>
				</div>
			</xsl:for-each>

			<div class="summary">
				<b><u>Geek Corner</u></b>: This page is generated using XSLT. <a href="xml/">See how</a>.
			</div>
		</body>
	</html>
</xsl:template>

<xsl:template match="comic">
	<tr>
	<td><a href="{url}"><img border="0" src="img/{@img}" width="{@width}" height="{@height}"/></a></td>
	<td><a href="{url}"><xsl:value-of select="@title"/></a></td>
	<td><xsl:for-each select="rss"><a href="{text()}">RSS</a></xsl:for-each></td>
	</tr>
</xsl:template>

</xsl:stylesheet>

