1
<?xml version="1.0"?>
2
<!-- Edited by XMLSpy® -->
3
<xsl:stylesheet version="1.0"
4
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>
6
7
8
<xsl:variable name="icon-dir">graphics/items</xsl:variable>
9
10
<xsl:template match="/">
11
  <html>
12
  <body>
13
  <h2>Item Database</h2>
14
      <xsl:for-each select="items/item">
15
      <xsl:sort select="@type"/>
16
        <xsl:if test="@name">
17
          
18
          <p>
19
          <table border="1">
20
          <tr bgcolor="ddddff">
21
            <td>
22
              <xsl:if test="@image">
23
              <img src="{$icon-dir}/{@image}"/>
24
              </xsl:if>
25
            </td>
26
            <td colspan="3">
27
              <xsl:value-of select="@name"/>
28
            </td>
29
          </tr>
30
          
31
          <tr>
32
            <td><strong>ID: </strong><xsl:value-of select="@id"/></td>
33
            <td><strong>Type: </strong><xsl:value-of select="@type"/></td>
34
            <xsl:if test="@weapon_type">
35
              <td><strong>Skill: </strong><xsl:value-of select="@weapon-type"/></td>
36
            </xsl:if>
37
            <td><strong>Weight: </strong><xsl:value-of select="@weight"/></td>          
38
          </tr>
39
          
40
          <tr>
41
            <td colspan="4"><strong>Description: </strong><xsl:value-of select="@description"/></td>
42
          </tr>
43
          <tr>
44
            <td colspan="4"><strong>Effect: </strong><xsl:value-of select="@effect"/></td>
45
          </tr>
46
          </table>
47
          </p>
48
        </xsl:if>
49
      </xsl:for-each>
50
  </body>
51
  </html>
52
</xsl:template>
53
</xsl:stylesheet>