<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<html>
			<head>
				<title>Using XSL to display images and links</title>
			</head>
			<body>
				<h1>Using XSL to display images and links</h1>
				<table align="center">
					<tbody>
						<tr>
							<xsl:apply-templates select="//picture"/>
						</tr>
					</tbody>
				</table>
				<hr/>
				<table align="center" width="100%">
					<tbody>
						<tr align="center">
							<td>
								<xsl:apply-templates select="//picture"/>
							</td>
						</tr>
						<tr align="center">
							<td>
								<xsl:apply-templates select="//website"/>
							</td>
						</tr>
						<tr align="center">
							<td>
								<xsl:apply-templates select="//email"/>
							</td>
						</tr>
					</tbody>
				</table>
			</body>
		</html>
	</xsl:template>
	<xsl:template match="picture">
		<img>
			<xsl:attribute name="src"><xsl:value-of select="./@filename"/></xsl:attribute>
			<xsl:attribute name="width"><xsl:value-of select="./@x"/></xsl:attribute>
			<xsl:attribute name="height"><xsl:value-of select="./@y"/></xsl:attribute>
		</img>
	</xsl:template>
	<xsl:template match="website">
		<a>
			<xsl:attribute name="href"><xsl:value-of select="./@href"/></xsl:attribute>
			<xsl:attribute name="title"><xsl:value-of select="."/></xsl:attribute>
			<xsl:value-of select="."/>
		</a>
	</xsl:template>
	<xsl:template match="email">
		<a>
			<xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute>
			<xsl:attribute name="title"><xsl:value-of select="."/></xsl:attribute>
			<xsl:value-of select="."/>
		</a>
	</xsl:template>
</xsl:stylesheet>

