comparison schemas/race.xsd @ 252:a54da5a8b5bb

Re #268: Restructure stats for re-use * Add "Member Type" class * Add member type setting and getting to Race * Load member types from XML files * Make unit type pull stat line from stats or first member type, or fall back to a blank stat line * Change Stats object to initialise blank values * Change schema * Make stats optional * Add member type list to race * Add optional member type references to units
author IBBoard <dev@ibboard.co.uk>
date Sun, 25 Apr 2010 15:07:08 +0000
parents 2f8fd45d55e2
children 0db25d5d0992
comparison
equal deleted inserted replaced
251:22509bd03ca2 252:a54da5a8b5bb
30 </xs:element> 30 </xs:element>
31 </xs:sequence> 31 </xs:sequence>
32 <xs:anyAttribute processContents="lax"/> 32 <xs:anyAttribute processContents="lax"/>
33 </xs:complexType> 33 </xs:complexType>
34 </xs:element> 34 </xs:element>
35 <xs:element name="memberTypes" minOccurs="0">
36 <xs:complexType>
37 <xs:sequence>
38 <xs:element name="memberType" maxOccurs="unbounded">
39 <xs:complexType>
40 <xs:sequence>
41 <xs:element name="stats" type="stats" minOccurs="0"/>
42 </xs:sequence>
43 <xs:attribute name="id" type="xs:ID" use="required"/>
44 <xs:attribute name="name" type="xs:string" use="required"/>
45 <xs:anyAttribute processContents="lax"/>
46 </xs:complexType>
47 </xs:element>
48 </xs:sequence>
49 </xs:complexType>
50 </xs:element>
35 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 51 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
36 </xs:sequence> 52 </xs:sequence>
37 <xs:attribute name="id" type="xs:ID" /> 53 <xs:attribute name="id" type="xs:ID" />
38 <xs:attribute name="subid" type="xs:string" default=""/> 54 <xs:attribute name="subid" type="xs:string" default=""/>
39 <xs:attribute name="name" type="xs:string" use="required"/> 55 <xs:attribute name="name" type="xs:string" use="required"/>
43 </xs:element> 59 </xs:element>
44 60
45 <!--Reusable complex types --> 61 <!--Reusable complex types -->
46 <xs:complexType name="unit"> 62 <xs:complexType name="unit">
47 <xs:sequence> 63 <xs:sequence>
48 <xs:element name="stats" type="stats"/> 64 <xs:element name="stats" type="stats" minOccurs="0"/>
49 <xs:element name="equipmentSlots" minOccurs="0"> 65 <xs:element name="equipmentSlots" minOccurs="0">
50 <xs:complexType> 66 <xs:complexType>
51 <xs:sequence> 67 <xs:sequence>
52 <xs:element name="equipmentSlot" maxOccurs="unbounded"> 68 <xs:element name="equipmentSlot" maxOccurs="unbounded">
53 <xs:complexType> 69 <xs:complexType>
159 </xs:simpleContent> 175 </xs:simpleContent>
160 </xs:complexType> 176 </xs:complexType>
161 </xs:element> 177 </xs:element>
162 </xs:sequence> 178 </xs:sequence>
163 <xs:anyAttribute processContents="lax"/> 179 <xs:anyAttribute processContents="lax"/>
180 </xs:complexType>
181 </xs:element>
182 <xs:element name="unitMembers" minOccurs="0">
183 <xs:complexType>
184 <xs:sequence>
185 <xs:element name="unitMember" maxOccurs="unbounded">
186 <xs:complexType>
187 <xs:sequence>
188 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
189 </xs:sequence>
190 <xs:attribute name="typeID" type="xs:IDREF" use="required"/>
191 <xs:anyAttribute processContents="lax"/>
192 </xs:complexType>
193 </xs:element>
194 </xs:sequence>
164 </xs:complexType> 195 </xs:complexType>
165 </xs:element> 196 </xs:element>
166 <xs:element name="notes" type="xs:string" minOccurs="0" /> 197 <xs:element name="notes" type="xs:string" minOccurs="0" />
167 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 198 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
168 </xs:sequence> 199 </xs:sequence>