File size: 5,439 Bytes
8097001
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="attribute">
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute type="xs:string" name="name" use="required"/>
          <xs:attribute name="type" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="string"/>
                <xs:enumeration value="time"/>
                <xs:enumeration value="integer"/>
                <xs:enumeration value="float"/>
                <xs:enumeration value="boolean"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute type="xs:dateTime" name="time" use="optional"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="attributes">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element ref="attribute" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="object-type">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="attributes"/>
      </xs:sequence>
      <xs:attribute type="xs:string" name="name" use="required"/>
    </xs:complexType>
    <xs:key name="objectTypeAttributeKey">
      <xs:selector xpath="attributes/attribute"/>
      <xs:field xpath="@name"/>
    </xs:key>
  </xs:element>
  <xs:element name="event-type">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="attributes"/>
      </xs:sequence>
      <xs:attribute type="xs:string" name="name" use="required"/>
    </xs:complexType>
    <xs:key name="eventTypeAttributeKey">
      <xs:selector xpath="attributes/attribute"/>
      <xs:field xpath="@name"/>
    </xs:key>
  </xs:element>
  <xs:element name="object">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element ref="attributes" minOccurs="0"/>
        <xs:element ref="objects" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute type="xs:string" name="object-id" use="optional"/>
      <xs:attribute type="xs:string" name="qualifier" use="optional"/>
      <xs:attribute type="xs:string" name="id" use="optional"/>
      <xs:attribute type="xs:string" name="type" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="objects">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="object" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="event">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="attributes"/>
        <xs:element ref="objects"/>
      </xs:sequence>
      <xs:attribute type="xs:string" name="id" use="required"/>
      <xs:attribute type="xs:string" name="type" use="required"/>
      <xs:attribute type="xs:dateTime" name="time" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="object-types">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="object-type" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="event-types">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="event-type" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="events">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="event" maxOccurs="unbounded" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="log">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="object-types"/>
        <xs:element ref="event-types"/>
        <xs:element ref="objects"/>
        <xs:element ref="events"/>
      </xs:sequence>
    </xs:complexType>
    <xs:key name="objectTypeKey">
      <xs:selector xpath="object-types/object-type"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="objectKey">
      <xs:selector xpath="objects/object"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:key name="eventTypeKey">
      <xs:selector xpath="event-types/event-type"/>
      <xs:field xpath="@name"/>
    </xs:key>
    <xs:key name="eventKey">
      <xs:selector xpath="events/event"/>
      <xs:field xpath="@id"/>
    </xs:key>
    <xs:keyref name="objectTypeRef" refer="objectTypeKey">
      <xs:selector xpath="objects/object"/>
      <xs:field xpath="@type"/>
    </xs:keyref>
    <xs:keyref name="eventTypeRef" refer="eventTypeKey">
      <xs:selector xpath="events/event"/>
      <xs:field xpath="@type"/>
    </xs:keyref>
    <xs:keyref name="objectObjectRef" refer="objectKey">
      <xs:selector xpath="objects/object/objects/object"/>
      <xs:field xpath="@object-id"/>
    </xs:keyref>
    <xs:keyref name="eventObjectRef" refer="objectKey">
      <xs:selector xpath="events/event/objects/object"/>
      <xs:field xpath="@object-id"/>
    </xs:keyref>
    <xs:keyref name="objectAttributeRef" refer="objectTypeAttributeKey">
      <xs:selector xpath="objects/object/attributes/attribute"/>
      <xs:field xpath="@name"/>
    </xs:keyref>
    <xs:keyref name="eventAttributeRef" refer="eventTypeAttributeKey">
      <xs:selector xpath="events/event/attributes/attribute"/>
      <xs:field xpath="@name"/>
    </xs:keyref>
  </xs:element>
</xs:schema>