VJA:Schema: Difference between revisions
Jump to navigation
Jump to search
(→Schema) |
m (→XML Schmema) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== XML | == XML Schema == | ||
Just copy and paste this into a new text and change the extension to .xsd | Just copy and paste this into a new text and change the extension to .xsd | ||
<pre> | <pre> | ||
Line 24: | Line 24: | ||
<xs:restriction base="xs:string"> | <xs:restriction base="xs:string"> | ||
<xs:minLength value="1"/> | <xs:minLength value="1"/> | ||
<xs:maxLength value=" | <xs:maxLength value="6"/> | ||
</xs:restriction> | </xs:restriction> | ||
</xs:simpleType> | </xs:simpleType> |
Latest revision as of 03:24, 14 April 2005
XML Schema
Just copy and paste this into a new text and change the extension to .xsd
<?xml version="1.0" encoding="UTF-8"?> <!-- created by David Wilson --!> <xs:schema targetNamespace="http://vjarmy.com/iidx/ns#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://vjarmy.com/iidx/ns#" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="vjadata"> <xs:complexType> <xs:sequence> <xs:element ref="user"/> </xs:sequence> <xs:attribute name="version" type="xs:float" default="0.1"/> </xs:complexType> </xs:element> <xs:element name="user"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:int"/> <xs:element name="login" type="xs:string"/> <xs:element name="djname"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="6"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element ref="scoredata"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="scoredata"> <xs:complexType> <xs:sequence> <xs:element ref="song" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="song"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:int"/> <xs:element name="songname" type="xs:string"/> <xs:element name="artist" type="xs:string"/> <xs:element name="genre" type="xs:string"/> <xs:element name="bpm"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:totalDigits value="3"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="styles" type="xs:string"/> <xs:element name="notes"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:totalDigits value="4"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="exscore"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:totalDigits value="4"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="grade"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="3"/> <xs:enumeration value="AAA"/> <xs:enumeration value="AA"/> <xs:enumeration value="A"/> <xs:enumeration value="B"/> <xs:enumeration value="C"/> <xs:enumeration value="D"/> <xs:enumeration value="E"/> <xs:enumeration value="F"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="djpoints"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:maxInclusive value="10"/> <xs:minInclusive value="0"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element ref="scorebreakdown"/> <xs:element ref="mods"/> <xs:element name="cleartype"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="played"/> <xs:enumeration value="cleared"/> <xs:enumeration value="combo"/> <xs:enumeration value="comboed"/> <xs:enumeration value="perfect"/> <xs:enumeration value="perfected"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="picurl" type="xs:anyURI" minOccurs="0"/> <xs:element name="comment" type="xs:string" minOccurs="0"/> <xs:element name="date" type="xs:string"/> </xs:sequence> <xs:attribute name="diff" use="required"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="L7"/> <xs:enumeration value="7"/> <xs:enumeration value="A"/> <xs:enumeration value="L14"/> <xs:enumeration value="14"/> <xs:enumeration value="A14"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> <xs:element name="scorebreakdown"> <xs:complexType> <xs:sequence> <xs:element name="justgreats" type="xs:int"/> <xs:element name="greats" type="xs:int"/> <xs:element name="good" type="xs:int"/> <xs:element name="bad" type="xs:int"/> <xs:element name="poor" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="mods"> <xs:complexType> <xs:sequence> <xs:element name="highspeed"> <xs:simpleType> <xs:restriction base="xs:int"/> </xs:simpleType> </xs:element> <xs:element name="hidsud" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="H"/> <xs:enumeration value="S"/> <xs:enumeration value="B"/> <xs:enumeration value="T"/> <xs:enumeration value="N"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="hardeasy" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="H"/> <xs:enumeration value="E"/> <xs:enumeration value="N"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="ranmir" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="R"/> <xs:enumeration value="M"/> <xs:enumeration value="B"/> <xs:enumeration value="N"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="autoscratch" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>