<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet  version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" 
    encoding="ISO-8859-1" 
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 
    indent="yes"/>

<xsl:param name="thePlace" select="'Barcelona'"/>

<xsl:template match="/">
<html>
<head>
    <title>Olympics</title>
</head>
<body>
    <xsl:apply-templates select="//OlympicGame[@place=$thePlace]"/>
</body>
</html>
</xsl:template>

<xsl:template match="OlympicGame">
    <h1>
        <xsl:value-of select="@place"/> - <xsl:value-of select="@year"/>
    </h1>
    <div id="mainblock">
    <table cellspacing="10" cellpadding="0" border="0">
    <xsl:apply-templates select="event"/>
    </table>
    </div>
</xsl:template>

<xsl:template match="event">
    <tr>
        <th colspan="3">
            <xsl:value-of select="@track"/>
        </th>
    </tr>
    <xsl:apply-templates select="athlet">
        <xsl:sort data-type="text" order="ascending" select="result"/>
    </xsl:apply-templates>

</xsl:template>

<xsl:template match="athlet">
<tr>
    <td><xsl:value-of select="name"/></td>
    <td><xsl:value-of select="nation"/></td>
    <td><xsl:value-of select="result"/></td>
</tr>
</xsl:template>

</xsl:stylesheet>