File: score.xsd

package info (click to toggle)
enigma 1.20-dfsg.1-2.2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 64,696 kB
  • sloc: xml: 153,614; cpp: 63,581; ansic: 31,088; sh: 4,825; makefile: 1,858; yacc: 288; perl: 84; sed: 16
file content (117 lines) | stat: -rw-r--r-- 5,727 bytes parent folder | download | duplicates (5)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' version="0.2" xml:lang="en">
  <xs:annotation>
    <xs:documentation>
      XML schema definitions for Enigma score
      Copyright © 2006,2007,2008,2009,2010 Ronald Lamprecht
      
      This program is free software; you can redistribute it and/or
      modify it under the terms of the GNU General Public License
      as published by the Free Software Foundation; either version 2
      of the License, or (at your option) any later version.

      This program is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU General Public License for more details.

      You should have received a copy of the GNU General Public License along
      with this program; if not, write to the Free Software Foundation, Inc.,
      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    </xs:documentation>
  </xs:annotation>
  <xs:element name="score">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="properties" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation>
              All simple key-value-properties:
              UserName, UserId, Count
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="key" type="xs:string" use="required"/>
                  <xs:attribute name="value" type="xs:string" use="required"/>
                </xs:complexType>
              </xs:element> <!-- property -->
            </xs:sequence>
          </xs:complexType>
        </xs:element> <!-- properties -->
        
        <xs:element name="levels" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation>
              Users level state:
              id         - level id
              version    - level score version
              easy1      - best ever score in easy mode independent of used Enigma release
              easy1rel   - Enigma release with which the score was achieved
              diff1      - best ever score in normal mode independent of used Enigma release
              diff1rel   - Enigma release with which the score was achieved
              easy2      - best score in easy mode played with a recent Enigma release
              easy2rel   - Enigma release with which the score was achieved
              diff2      - best score in normal mode played with a recent Enigma release
              diff2rel   - Enigma release with which the score was achieved
              rating     - user rating for the level in the given score version
              sec        - security sum
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:element name="level" minOccurs="0" maxOccurs="unbounded" >
                <xs:complexType>
                  <xs:attribute name="id" type="xs:string" use="required"/>
                  <xs:attribute name="version" type="xs:positiveInteger" use="required"/>
                  <xs:attribute name="easy1" type="uscoreType" use="optional" default="-1"/>
                  <xs:attribute name="easy1rel" type="xs:float" use="optional" default="0.92"/>
                  <xs:attribute name="diff1" type="uscoreType" use="optional" default="-1"/>
                  <xs:attribute name="diff1rel" type="xs:float" use="optional" default="0.92"/>
                  <xs:attribute name="easy2" type="uscoreType" use="optional" default="-1"/>
                  <xs:attribute name="easy2rel" type="xs:float" use="optional" default="0.92"/>
                  <xs:attribute name="diff2" type="uscoreType" use="optional" default="-1"/>
                  <xs:attribute name="diff2rel" type="xs:float" use="optional" default="0.92"/>
                  <xs:attribute name="rating" type="ratingType" use="optional" default="-1"/>
                  <xs:attribute name="rating-inherited" type="ratingType" use="optional" default="-1"/>
                  <xs:attribute name="sec" type="xs:string" use="required"/>
                  <xs:anyAttribute namespace="##targetNamespace" processContents="skip"/>
                </xs:complexType>
              </xs:element> <!-- level -->
            </xs:sequence>
          </xs:complexType>
        </xs:element> <!-- levels -->
        
        <xs:element name="indices" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation>
              Index based scoring info
            </xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
                <xs:any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
            </xs:sequence>
            <xs:anyAttribute namespace="##targetNamespace" processContents="skip"/>
          </xs:complexType>
        </xs:element> <!-- indices -->
        
        <xs:any namespace="##targetNamespace" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element> <!-- score -->
  
  <xs:simpleType name="uscoreType">
    <xs:restriction base="xs:short">
      <xs:minInclusive value="-2"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ratingType">
    <xs:restriction base="xs:short">
      <xs:minInclusive value="-1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>