File: score_style.xsl

package info (click to toggle)
python-qt4 4.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 40,300 kB
  • ctags: 6,185
  • sloc: python: 125,988; cpp: 13,291; xml: 292; makefile: 246; php: 27; sh: 2
file content (28 lines) | stat: -rw-r--r-- 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>