<?xml version="1.0"?>
<xsl:stylesheet 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	version="1.0">

<xsl:template match="/"><html><head><title>James Bond Pictures</title></head>
<body bgcolor="black" text="white" style="font-family: arial, serif;">

<h1 align="center">The Bond Picture Gallery </h1>


<table width="100%" bordercolor="maroon" border="1">
<tr>
<th><font color="#FFCC99">Picture</font></th>
<th><font color="#FFCC99">James Bond</font></th>
<th><font color="#FFCC99">Year</font></th>
<th><font color="#FFCC99">Director</font></th>
<th><font color="#FFCC99">Length (min)</font></th>
<th><font color="#FFCC99">Rating</font></th>
</tr>

	<xsl:apply-templates select="films/film"/>

</table>
</body>
</html>
</xsl:template>


<xsl:template match="film">

<tr>
<td align="center"><xsl:apply-templates select="photo"/></td>

<td align="center"><xsl:apply-templates select="actor/james_bond"/></td>

<td align="center"><xsl:apply-templates select="year"/></td>

<td align="center"><xsl:apply-templates select="director"/></td>

<td align="center"><xsl:apply-templates select="length"/></td>

<td align="center"><xsl:apply-templates select="rating"/></td>
</tr>

</xsl:template>


<xsl:template match="title">
	<nobr><b><xsl:value-of select="."/>: </b></nobr>
</xsl:template>

<xsl:template match="photo">
<img>
<xsl:attribute name="src"><xsl:value-of select="./@source"/></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="actor/james_bond">
	<nobr><b><xsl:value-of select="."/> </b></nobr>
</xsl:template>

<xsl:template match="year">
	<nobr><b><xsl:value-of select="."/> </b></nobr>
</xsl:template>

<xsl:template match="director">
	<nobr><b><xsl:value-of select="."/></b></nobr>
</xsl:template>

<xsl:template match="length">
	<nobr><b><xsl:value-of select="."/> </b></nobr>
</xsl:template>

<xsl:template match="rating">
	<nobr><b><xsl:value-of select="."/> </b></nobr>
</xsl:template>




	
</xsl:stylesheet>

