summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--itemxml/items.xsd44
-rw-r--r--itemxml/items.xsl53
2 files changed, 97 insertions, 0 deletions
diff --git a/itemxml/items.xsd b/itemxml/items.xsd
new file mode 100644
index 0000000..d5e334e
--- /dev/null
+++ b/itemxml/items.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <!-- IMAGE TYPE -->
+
+ <xsd:simpleType name="mw_ItemArtType">
+ <xsd:restriction base="xsd:integer">
+ <xsd:minInclusive value="0" />
+ <xsd:maxInclusive value="1" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- ITEMS LIST FILE SCHEMA -->
+
+ <xsd:element name="items">
+ <xsd:complexType>
+ <xsd:sequence>
+
+ <xsd:element name="item" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="description" type="xsd:string" />
+ <xsd:attribute name="effect" type="xsd:string" />
+ <xsd:attribute name="id" type="xsd:positiveInteger" />
+ <xsd:attribute name="image" type="xsd:positiveInteger" />
+ <xsd:attribute name="art" type="mw_ItemArtType" />
+ <xsd:attribute name="type" type="xsd:integer" />
+ <xsd:attribute name="slot" type="xsd:integer" />
+ <xsd:attribute name="weight" type="xsd:positiveInteger" />
+ <xsd:attribute name="drawBefore" type="xsd:string" />
+ <xsd:attribute name="drawAfter" type="xsd:string" />
+ <xsd:attribute name="drawPriority" type="xsd:integer" />
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+</xsd:schema>
diff --git a/itemxml/items.xsl b/itemxml/items.xsl
new file mode 100644
index 0000000..15f04da
--- /dev/null
+++ b/itemxml/items.xsl
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!-- Edited by XMLSpy® -->
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>
+
+
+<xsl:variable name="icon-dir">graphics/items</xsl:variable>
+
+<xsl:template match="/">
+ <html>
+ <body>
+ <h2>Item Database</h2>
+ <xsl:for-each select="items/item">
+ <xsl:sort select="@type"/>
+ <xsl:if test="@name">
+
+ <p>
+ <table border="1">
+ <tr bgcolor="ddddff">
+ <td>
+ <xsl:if test="@image">
+ <img src="{$icon-dir}/{@image}"/>
+ </xsl:if>
+ </td>
+ <td colspan="3">
+ <xsl:value-of select="@name"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td><strong>ID: </strong><xsl:value-of select="@id"/></td>
+ <td><strong>Type: </strong><xsl:value-of select="@type"/></td>
+ <xsl:if test="@weapon_type">
+ <td><strong>Skill: </strong><xsl:value-of select="@weapon-type"/></td>
+ </xsl:if>
+ <td><strong>Weight: </strong><xsl:value-of select="@weight"/></td>
+ </tr>
+
+ <tr>
+ <td colspan="4"><strong>Description: </strong><xsl:value-of select="@description"/></td>
+ </tr>
+ <tr>
+ <td colspan="4"><strong>Effect: </strong><xsl:value-of select="@effect"/></td>
+ </tr>
+ </table>
+ </p>
+ </xsl:if>
+ </xsl:for-each>
+ </body>
+ </html>
+</xsl:template>
+</xsl:stylesheet> \ No newline at end of file