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

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:variable name="events" select="count(//dd)"/>
<xsl:template match="/">
<xsl:apply-templates select="//dl"/>
</xsl:template>
<xsl:template match="dl">
<xsl:element name="schedule">
<xsl:attribute name="events"><xsl:value-of select="$events"/></xsl:attribute>
<xsl:apply-templates select="dt"/>
</xsl:element>
</xsl:template>
<xsl:template match="dt">
<xsl:element name="event">
<xsl:element name="date"><xsl:value-of select="."/></xsl:element>
<xsl:apply-templates select="following-sibling::dd[1]"/>
</xsl:element>
</xsl:template>
<xsl:template match="dd">
<xsl:element name="description"><xsl:value-of select="."/></xsl:element>
</xsl:template>
</xsl:stylesheet>