Projekt

Obecné

Profil

Task #627 » NewXMLSchema.xsd

Anton Dekterov, 2011-08-23 12:54

 
1
<?xml version="1.0" encoding="UTF-8"?>
2
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/NewXMLSchema" xmlns:tns="http://www.example.org/NewXMLSchema" elementFormDefault="qualified">
3

    
4
    <element name="solarsystem" type="tns:SolarSystemDescription">
5
    	<annotation>
6
    		<documentation>
7
    			Solarni system, ma jednoznacny a jediencny nazev, ktery
8
    			se vklada do atributu name
9
    		</documentation>
10
    	</annotation>
11
    </element>
12

    
13
    <attribute name="name" type="string"></attribute>
14

    
15

    
16
    <element name="planet" type="tns:planetsDescription"></element>
17
    
18
    <complexType name="planetsDescription">
19
    	<sequence>
20
    		<element name="description" type="string">
21
    			<annotation>
22
    				<documentation>popis planety, nevim presne jak resit lokalizaci pro kazdy jazyk bude vlasti policko? nebo jen odkaz vot kud to muze pak natahnout.</documentation>
23
    			</annotation></element>
24
    		<element name="forse" type="float">
25
    			<annotation>
26
    				<documentation>
27
    					Sila ktera na planetu pusobi, ma vliv na
28
    					akceliraci, treba take muze mit vliv na
29
    					vzdalenost od hvezdy
30
    				</documentation>
31
    			</annotation>
32
    		</element>
33
    		<element ref="tns:velocity">
34
    			<annotation>
35
    				<documentation>
36
    					vlastne popisuje jakym spusobem objekt pochybuje
37
    					( zatim jsou dva po elipse a po kruhu)
38
    				</documentation>
39
    			</annotation>
40
    		</element>
41
    		<element name="mass" type="double">
42
    			<annotation>
43
    				<documentation>
44
    					massa planety v kg :), ma vliv na rychlost a akceleraci
45
    				</documentation>
46
    			</annotation>
47
    		</element>
48
    		<element ref="tns:element">
49
    			<annotation>
50
    				<documentation>
51
    					reprezentace objektu, typ objektu a volitelne
52
    					hodnoty
53
    				</documentation>
54
    			</annotation>
55
    		</element>
56
    	</sequence>
57
    	<attribute name="name" type="string" use="required"></attribute>
58
    </complexType>
59

    
60
    <element name="img" type="tns:imgaDescription"></element>
61

    
62

    
63
    <complexType name="imgaDescription">
64
    	<attribute name="src" type="string"></attribute>
65
    </complexType>
66

    
67
    <element name="velocity" type="tns:velocityDescription"></element>
68
    
69
    <complexType name="velocityDescription">
70
    	<choice>
71
    		<element ref="tns:elipse"></element>
72
    		<element ref="tns:round"></element>
73
    	</choice>
74

    
75
    </complexType>
76
    
77

    
78
    <element name="round" type="tns:radius"></element>
79
    
80

    
81
    <complexType name="radius">
82
    	<attribute name="radis" type="int" use="required"></attribute>
83
    </complexType>
84

    
85
    <element name="elipse" type="tns:elipse"></element>
86

    
87
    <complexType name="elipse">
88
    	<attribute name="rX" type="int" use="required"></attribute>
89
    	<attribute name="rY" type="int" use="required"></attribute>
90
    </complexType>
91

    
92
    <group name="NewGroupDefinition">
93
    	<sequence></sequence>
94
    </group>
95

    
96
    <complexType name="SolarSystemDescription">
97
    	<sequence>
98
    		<element ref="tns:planet" maxOccurs="10"></element>
99
    		<element ref="tns:wormhole" maxOccurs="5"></element>
100
    		<element name="star" type="tns:planetsDescription">
101
    			<annotation>
102
    				<documentation>nevi jestli je vhodne definivat hvezdu jako planetu, ma celkem podobny popis</documentation>
103
    			</annotation></element>
104
    	</sequence>
105
    	<attribute name="name" type="string" use="required"></attribute>
106
    </complexType>
107

    
108
    <element name="element" type="tns:elementDescription"></element>
109
    
110
    <complexType name="elementDescription">
111
    	<choice>
112
    		<element name="src" type="string"></element>
113
    		<element name="href" type="string"></element>
114
    		<element name="width" type="double"></element>
115
    		<element name="height" type="double"></element>
116
    		<element name="class" type="string"></element>
117
    		<element name="id" type="string"></element>
118
    		<element name="startX" type="double"></element>
119
    		<element name="startY" type="double"></element>
120
    		<element name="nullPoint" type="float">
121
    			<annotation>
122
    				<documentation>herni datum vzniku elementu, podle toho lze vypocitat kde aktualne objekt nachazi</documentation>
123
    			</annotation></element>
124
    	</choice>
125
    	<attribute name="type" type="string" use="required">
126
    		<annotation>
127
    			<documentation>
128
    				popisuje typ elementu (canvas, a, div), urcuje chovani objektu, podle tohe se predeluje akce onload, onready, click...
129
    			</documentation>
130
    		</annotation>
131
    	</attribute>
132
    </complexType>
133

    
134
    <element name="wormhole" type="tns:wormhleDescriptioin"></element>
135

    
136
    <complexType name="wormhleDescriptioin">
137
    	<sequence>
138
    		<element name="descriptioin" type="string">
139
    			<annotation>
140
    				<documentation>popis cervi diry, nebo odkaz na stazeni popisu</documentation>
141
    			</annotation></element>
142
    		<element name="targetSystem" type="string">
143
    			<annotation>
144
    				<documentation>odkaz na cilovou soustavu</documentation>
145
    			</annotation></element>
146
    	</sequence>
147
    	<attribute name="name" type="string" use="required"></attribute>
148
    	<attribute name="type" type="string" use="required">
149
    		<annotation>
150
    			<documentation>vlaste bude dva typy - (in, out) prichozi, odchozi nebo tak nejak, s predpokladu, ze cervi diry jsou jen jednosmerne</documentation>
151
    		</annotation></attribute>
152
    </complexType>
153
</schema>
(1-1/2)