-
Notifications
You must be signed in to change notification settings - Fork 0
/
shapes.xsd
123 lines (103 loc) · 3.39 KB
/
shapes.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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="circle" type="circle"/>
<xs:element name="fillCircle" type="fillCircle"/>
<xs:element name="fillOval" type="fillOval"/>
<xs:element name="fillRectangle" type="fillRectangle"/>
<xs:element name="line" type="line"/>
<xs:element name="oval" type="oval"/>
<xs:element name="rectangle" type="rectangle"/>
<xs:element name="shapes" type="shapes"/>
<xs:element name="text" type="text"/>
<xs:complexType name="shapes">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="line"/>
<xs:element ref="text"/>
<xs:element ref="rectangle"/>
<xs:element ref="fillRectangle"/>
<xs:element ref="oval"/>
<xs:element ref="fillOval"/>
<xs:element ref="circle"/>
<xs:element ref="fillCircle"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="abstractShape" abstract="true">
<xs:sequence>
<xs:element name="color" type="xs:string" minOccurs="0"/>
<xs:element name="x" type="xs:int"/>
<xs:element name="y" type="xs:int"/>
</xs:sequence>
<xs:attribute name="order" type="xs:int" use="required"/>
</xs:complexType>
<xs:complexType name="line">
<xs:complexContent>
<xs:extension base="abstractShape">
<xs:sequence>
<xs:element name="x2" type="xs:int"/>
<xs:element name="y2" type="xs:int"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="text">
<xs:complexContent>
<xs:extension base="abstractShape">
<xs:sequence>
<xs:element name="text" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="rectangle">
<xs:complexContent>
<xs:extension base="abstractShape">
<xs:sequence>
<xs:element name="height" type="xs:int"/>
<xs:element name="width" type="xs:int"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="fillRectangle" final="extension restriction">
<xs:complexContent>
<xs:extension base="rectangle">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="oval">
<xs:complexContent>
<xs:extension base="abstractShape">
<xs:sequence>
<xs:element name="height" type="xs:int"/>
<xs:element name="width" type="xs:int"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="fillOval" final="extension restriction">
<xs:complexContent>
<xs:extension base="oval">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="circle">
<xs:complexContent>
<xs:extension base="oval">
<xs:sequence>
<xs:element name="radius" type="xs:int"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="fillCircle" final="extension restriction">
<xs:complexContent>
<xs:extension base="circle">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>