1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <xs:schema xmlns:
xs=
"http://www.w3.org/2001/XMLSchema">
3 <xs:simpleType name=
"itemAttributeType">
4 <xs:restriction base=
"xs:string">
5 <xs:enumeration value=
"Health"/>
6 <xs:enumeration value=
"SpeedBoost"/>
10 <xs:simpleType name=
"squareAttributeType">
11 <xs:restriction base=
"xs:string">
12 <xs:enumeration value=
"TowerSquare"/>
13 <xs:enumeration value=
"TurnSquare"/>
14 <xs:enumeration value=
"PathSquare"/>
15 <xs:enumeration value=
"BlockedSquare"/>
16 <xs:enumeration value=
"GoalSquare"/>
17 <xs:enumeration value=
"StartSquare"/>
21 <xs:simpleType name=
"towerAttributeType">
22 <xs:restriction base=
"xs:string">
23 <xs:enumeration value=
"BasicTower"/>
27 <xs:simpleType name=
"directionAttributeType">
28 <xs:restriction base=
"xs:string">
29 <xs:enumeration value=
"UP"/>
30 <xs:enumeration value=
"DOWN"/>
31 <xs:enumeration value=
"LEFT"/>
32 <xs:enumeration value=
"RIGHT"/>
38 <xs:element name=
"levels">
41 <xs:element minOccurs=
"1" maxOccurs=
"unbounded" ref=
"level"/>
46 <xs:element name=
"level">
49 <xs:element maxOccurs=
"unbounded" ref=
"towers"/>
50 <xs:element minOccurs=
"1" maxOccurs=
"unbounded" ref=
"row"/>
52 <xs:attribute name=
"name" use=
"required" type=
"xs:string"/>
53 <xs:attribute name=
"unitsToWin" use=
"required" type=
"xs:integer"/>
57 <xs:element name=
"towers">
60 <xs:element maxOccurs=
"unbounded" ref=
"tower"/>
65 <xs:element name=
"tower">
67 <xs:attribute name=
"type" use=
"required" type=
"towerAttributeType"/>
71 <xs:element name=
"row">
74 <xs:element minOccurs=
"3" maxOccurs=
"unbounded" ref=
"square"/>
79 <xs:element name=
"square">
81 <xs:attribute name=
"type" use=
"required" type=
"squareAttributeType"/>
82 <!-- TODO: only StartSquares should have directions from xml -->
83 <xs:attribute name=
"direction" use=
"optional" type=
"directionAttributeType"/>