Static website for local motocross track (circa Jun 2004)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

52 lines
1.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:output method="html" indent="yes"/>
  4. <xsl:template match="/">
  5. <xsl:apply-templates/>
  6. </xsl:template>
  7. <xsl:template match="race">
  8. <table cellspacing="0" width="100%" id="results">
  9. <tr class="racename">
  10. <th colspan="3" class="textleft"><xsl:value-of select="name"/> Race Results</th>
  11. <th colspan="3" class="textright"><xsl:value-of select="date"/></th>
  12. </tr>
  13. <tr class="labels">
  14. <td>Place</td>
  15. <td>Name</td>
  16. <td>Brand</td>
  17. <td>Number</td>
  18. <td>Moto1</td>
  19. <td>Moto2</td>
  20. </tr>
  21. <xsl:apply-templates select="classes"/>
  22. </table>
  23. </xsl:template>
  24. <xsl:template match="classes">
  25. <xsl:apply-templates select="class"/>
  26. </xsl:template>
  27. <xsl:template match="class">
  28. <tr>
  29. <td colspan="8" class="classname"><xsl:value-of select="@name"/></td>
  30. </tr>
  31. <xsl:for-each select="entry">
  32. <xsl:sort select="result/@overall" data-type="number" lang="C"/>
  33. <xsl:apply-templates select="."/>
  34. </xsl:for-each>
  35. </xsl:template>
  36. <xsl:template match="entry">
  37. <tr>
  38. <td class="place"><xsl:value-of select="result/@overall"/></td>
  39. <td class="ridername"><xsl:value-of select="name"/></td>
  40. <td><xsl:value-of select="bike/brand"/></td>
  41. <td><xsl:value-of select="bike/number"/></td>
  42. <td><xsl:value-of select="result/moto1"/></td>
  43. <td><xsl:value-of select="result/moto2"/></td>
  44. </tr>
  45. </xsl:template>
  46. </xsl:stylesheet>