-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrd.xsd
162 lines (141 loc) · 5.01 KB
/
srd.xsd
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
158
159
160
161
162
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation>
School Readers Data schema.
Version 1.0.
Base element is a STUDENT (also used for pupils).
You can optionally use OTHER to also import teachers and other stuff members.
You should also add SOURCE to provide meta-data of the source program.
Any reader MUST have a first and a last name.
Readers uniqueness is recognised with a combination:
first name, last name, national ID.
For students school ID and class ID (grade) is also taken into account.
National ID for Poland is the PESEL.
National ID for e.g. USA is the Social Security Number.
National ID can be skipped especially for countries that don't use it (e.g. UK).
Also note that `email` may be used both for identification
and for contacting readers (notifications).
</xs:documentation>
</xs:annotation>
<xs:element name="DATA">
<xs:complexType>
<xs:sequence>
<xs:element name="SOURCE" type="elSOURCE" minOccurs="0" maxOccurs="1"/>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="STUDENT" type="elSTUDENT" />
<xs:element name="OTHER" type="elOTHER" />
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="elSOURCE">
<xs:annotation>
<xs:documentation>
Source program or generator info.
</xs:documentation>
</xs:annotation>
<xs:attribute name="name"/>
<xs:attribute name="date" type="xs:date"/>
<xs:attribute name="time"/>
<xs:attribute name="srd_version"/>
</xs:complexType>
<xs:complexType name="elSTUDENT">
<xs:annotation>
<xs:documentation>
Student (pupil) of a school.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="address" type="elAddress" minOccurs="0" maxOccurs="1"/>
<xs:choice>
<xs:element name="school" type="elSchool" maxOccurs="1"/>
<xs:element name="school_to" type="elSchoolTo" maxOccurs="unbounded"/>
</xs:choice>
</xs:sequence>
<xs:attributeGroup ref="attrPersonalData"/>
</xs:complexType>
<xs:complexType name="elOTHER">
<xs:annotation>
<xs:documentation>
Stuff, parent etc.
Use type to specify if the reader is a teacher.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="type" type="elReaderType" minOccurs="0" maxOccurs="1"/>
<xs:element name="address" type="elAddress" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attributeGroup ref="attrPersonalData"/>
</xs:complexType>
<xs:attributeGroup name="attrPersonalData">
<xs:attribute name="last_name" type="xs:string" use="required"/>
<xs:attribute name="first_name" type="xs:string" use="required"/>
<xs:attribute name="gender"/>
<xs:attribute name="national_id"/>
<xs:attribute name="birthdate" type="xs:date"/>
<xs:attribute name="barcode"/>
</xs:attributeGroup>
<xs:complexType name="elAddress">
<xs:annotation>
<xs:documentation>
Contact information.
</xs:documentation>
</xs:annotation>
<xs:attribute name="street"/>
<xs:attribute name="number"/>
<xs:attribute name="post_code"/>
<xs:attribute name="city"/>
<xs:attribute name="country"/>
<xs:attribute name="phone"/>
<xs:attribute name="email"/>
</xs:complexType>
<xs:complexType name="elSchool">
<xs:annotation>
<xs:documentation>
School and place (grade) of a student.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="place" type="elPlace"/>
</xs:sequence>
<xs:attribute name="school_id" type="xs:string" use="required"/>
<xs:attribute name="name"/>
</xs:complexType>
<xs:complexType name="elSchoolTo">
<xs:annotation>
<xs:documentation>
School to which a student want to be qualified.
Avoid using this type if possible.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="place_to" type="elPlace"/>
</xs:sequence>
<xs:attribute name="school_id" type="xs:string" use="required"/>
<xs:attribute name="name"/>
</xs:complexType>
<xs:complexType name="elPlace">
<xs:annotation>
<xs:documentation>
A place (grade / class) of a student.
Use a symbol like "A" for different classes on the same level (groups).
Level is a number of school years or age of children in the class.
So a place "1A" would be 1st graders in A group.
</xs:documentation>
</xs:annotation>
<xs:attribute name="level" type="xs:byte" use="required"/>
<xs:attribute name="symbol"/>
</xs:complexType>
<xs:complexType name="elReaderType" mixed="true">
<xs:annotation>
<xs:documentation>
Use English or Polish names here.
If ommited default type will be Other.
Note that teachers might have some extra loan limits etc.
EN: Teacher, Other.
PL: Nauczyciel, Inne.
</xs:documentation>
</xs:annotation>
</xs:complexType>
</xs:schema>