<?xml version = "1.0"?>
<!-- reference XSL style sheet URI -->
<xsl:stylesheet version = "1.0" 
   xmlns:xsl = "http://www.w3.org/1999/XSL/Transform">

   <xsl:output method = "html" omit-xml-declaration = "no" 
      doctype-system = 
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
      doctype-public = "-//W3C//DTD XHTML 1.0 Strict//EN"/>

   <xsl:template match = "/"> <!-- match root element -->

   <html xmlns = "http://www.w3.org/1999/xhtml">
      <head>
         <title>Tennis Stats</title>
      </head>

      <body>
         <table border = "1" background="tennisball.jpg">
            <thead>
               <tr>
                  <th>ID</th>
                  <th>Player</th>
                  <th>Record(W/L)</th>
                 <th>Age</th>
               </tr>
            </thead>

            <!-- insert each name, record, and age element value -->
            <!-- into a table row. -->
            <xsl:for-each select = "/tennis/game">
               <tr>
                  <td><xsl:value-of select = "@id"/></td>      
                  <td><xsl:value-of select = "name"/></td>     
                  <td><xsl:value-of select = "record"/></td>
                  <td><xsl:value-of select = "age"/></td>
               </tr>
            </xsl:for-each>
         </table>
      </body>
   </html>

   </xsl:template>
</xsl:stylesheet>
