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.
52 lines
1.5 KiB
52 lines
1.5 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
<xsl:output method="html" indent="yes"/>
|
|
|
|
<xsl:template match="/">
|
|
<xsl:apply-templates/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="race">
|
|
<table cellspacing="0" width="100%" id="results">
|
|
<tr class="racename">
|
|
<th colspan="3" class="textleft"><xsl:value-of select="name"/> Race Results</th>
|
|
<th colspan="3" class="textright"><xsl:value-of select="date"/></th>
|
|
</tr>
|
|
<tr class="labels">
|
|
<td>Place</td>
|
|
<td>Name</td>
|
|
<td>Brand</td>
|
|
<td>Number</td>
|
|
<td>Moto1</td>
|
|
<td>Moto2</td>
|
|
</tr>
|
|
<xsl:apply-templates select="classes"/>
|
|
</table>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="classes">
|
|
<xsl:apply-templates select="class"/>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="class">
|
|
<tr>
|
|
<td colspan="8" class="classname"><xsl:value-of select="@name"/></td>
|
|
</tr>
|
|
<xsl:for-each select="entry">
|
|
<xsl:sort select="result/@overall" data-type="number" lang="C"/>
|
|
<xsl:apply-templates select="."/>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
<xsl:template match="entry">
|
|
<tr>
|
|
<td class="place"><xsl:value-of select="result/@overall"/></td>
|
|
<td class="ridername"><xsl:value-of select="name"/></td>
|
|
<td><xsl:value-of select="bike/brand"/></td>
|
|
<td><xsl:value-of select="bike/number"/></td>
|
|
<td><xsl:value-of select="result/moto1"/></td>
|
|
<td><xsl:value-of select="result/moto2"/></td>
|
|
</tr>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|