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.

29 lines
895 B

  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="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  4. <xsl:variable name="events" select="count(//dd)"/>
  5. <xsl:template match="/">
  6. <xsl:apply-templates select="//dl"/>
  7. </xsl:template>
  8. <xsl:template match="dl">
  9. <xsl:element name="schedule">
  10. <xsl:attribute name="events"><xsl:value-of select="$events"/></xsl:attribute>
  11. <xsl:apply-templates select="dt"/>
  12. </xsl:element>
  13. </xsl:template>
  14. <xsl:template match="dt">
  15. <xsl:element name="event">
  16. <xsl:element name="date"><xsl:value-of select="."/></xsl:element>
  17. <xsl:apply-templates select="following-sibling::dd[1]"/>
  18. </xsl:element>
  19. </xsl:template>
  20. <xsl:template match="dd">
  21. <xsl:element name="description"><xsl:value-of select="."/></xsl:element>
  22. </xsl:template>
  23. </xsl:stylesheet>