<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html" />
	<xsl:template match="/">
      <html>
			<head>
				<style> BODY, P, TD, TH {font-family: century gothic; font-size: 11pt} </style>
			</head>
			<body>
			   	<xsl:call-template name="datos_rally"/>
			   	<table cellspacing="0" cellpadding="1" border="1">
								<tbody>
									<tr>
										<th>Prueba</th>
										<th>Condiciones Tiempo</th>
										<th>Numero Coches</th>
										<th>Terreno</th>
										<th>Distancia</th>
										<th>Temperatura</th>
										<th>Ganador</th>
										<th>Horas</th>										
										<th>Minutos</th>
										<th>Segundos</th>																				
									</tr>
									<xsl:apply-templates select="/rallys/carrera"/>
								</tbody>
				</table>
			</body>
		</html>	
	</xsl:template>
	<xsl:template name="datos_rally">
		<p>
			<b> Resumen Campeonato: </b>
			<br></br>
			<br>A continuación mostraremos una tabla con resultados de los distintos rallys del </br>
			<b>mundial 05/06</b>
			<br></br>
		</p>
	</xsl:template>
	<xsl:template match="carrera">
		<tr>
			<td>
				<b>
					<xsl:value-of select="@nombre"/>
				</b>
			</td>
			<td>
				<xsl:value-of select="CondicionesTiempo"/>&#160;
			</td>
			<td>
				<xsl:value-of select="@numCoches"/>&#160;
			</td>
			<td>
				<xsl:value-of select="Caracteristicas/Terreno"/>&#160;
			</td>
			<td>
				<xsl:value-of select="Caracteristicas/distancia"/>&#160;
			</td>
			<td>
				<xsl:value-of select="Caracteristicas/Temperatura"/>&#160;
			</td>
			<td>
				<i>
				<xsl:value-of select="Ganador"/>&#160;
				</i>
			</td>
			<td>
				<xsl:value-of select="Caracteristicas/horas"/>&#160;
			</td>
			<td>
				<xsl:value-of select="Caracteristicas/minutos"/>&#160;
			</td>
			<td>
				<xsl:value-of select="Caracteristicas/segundos"/>&#160;
			</td>
		</tr>
		
	
	</xsl:template>
</xsl:stylesheet>
