File: score_style.xsl

package info (click to toggle)
python-qt4 4.9.3-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 34,432 kB
  • sloc: python: 34,126; cpp: 11,938; xml: 290; makefile: 223; php: 27
file content (28 lines) | stat: -rwxr-xr-x 842 bytes parent folder | download | duplicates (44)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
  <html>
  <head><title>SameGame High Scores</title></head>
  <body>
  <h2>SameGame High Scores</h2>
    <table border="1">
      <tr bgcolor="lightsteelblue">
        <th>Name</th>
        <th>Score</th>
        <th>Grid Size</th>
        <th>Time, s</th>
      </tr>
      <xsl:for-each select="records/record">
      <xsl:sort select="score" data-type="number" order="descending"/>
      <tr>
        <td><xsl:value-of select="name"/></td>
        <td><xsl:value-of select="score"/></td>
        <td><xsl:value-of select="gridSize"/></td>
        <td><xsl:value-of select="seconds"/></td>
      </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>
</xsl:stylesheet>