-
Notifications
You must be signed in to change notification settings - Fork 0
/
curriculum.xsd
83 lines (83 loc) · 2.85 KB
/
curriculum.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
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="curriculum">
<xs:complexType>
<xs:sequence>
<xs:element name="group" type="groupType"/>
<xs:element name="courses" type="coursesType"/>
<xs:element name="semester-recommendation" type="semesterRecType">
<xs:unique name="onlyRecommendedOnce">
<xs:selector xpath=".//cref"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="source" type="xs:string" use="required"/>
</xs:complexType>
<xs:key name="groupNameKey">
<xs:selector xpath=".//group"/>
<xs:field xpath="@name"/>
</xs:key>
<xs:keyref name="requiresRef" refer="groupNameKey">
<xs:selector xpath=".//group"/>
<xs:field xpath="@requires"/>
</xs:keyref>
<xs:key name="courseNameKey">
<xs:selector xpath="courses/course"/>
<xs:field xpath="@name"/>
</xs:key>
<xs:keyref name="cref" refer="courseNameKey">
<xs:selector xpath=".//cref"/>
<xs:field xpath="@name"/>
</xs:keyref>
</xs:element>
<xs:complexType name="coursesType">
<xs:choice>
<xs:element name="course" type="courseType" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="groupType">
<xs:choice>
<xs:element name="group" type="groupType" maxOccurs="unbounded">
<xs:unique name="crefUniqueInSubgroup">
<xs:selector xpath="cref"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="cref" type="crefType" maxOccurs="unbounded"/>
<xs:element name="variable" type="variableType"/>
</xs:choice>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="minEcts" type="positiveFloat"/>
<xs:attribute name="maxEcts" type="positiveFloat"/>
<xs:attribute name="maxEctsIfUncompleted" type="positiveFloat"/>
<xs:attribute name="required" type="xs:boolean"/>
<xs:attribute name="requires" type="xs:string"/>
</xs:complexType>
<xs:complexType name="courseType">
<xs:attribute name="ects" type="positiveFloat" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="crefType">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="variableType">
</xs:complexType>
<xs:complexType name="semesterRecType">
<xs:choice>
<xs:element name="semester" type="semesterType" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="semesterType">
<xs:choice>
<xs:element name="cref" type="crefType" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="positiveFloat">
<xs:restriction base="xs:float">
<xs:minExclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>