Mercurial > repos > IBDev-IBBoard.WarFoundry.API
annotate dtds/army.xsd @ 61:3c77722a02b5
Re #61 - Complete structure of WarFoundry API objects
* Add containership support to Unit class
* Add method to UnitType to check if a UnitType is of an allowed type
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 09 Apr 2009 14:17:53 +0000 |
parents | 0c3500fca49d |
children | e7a6f460be57 |
rev | line source |
---|---|
36 | 1 <?xml version="1.0"?> |
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/army" xmlns="http://ibboard.co.uk/warfoundry/army" elementFormDefault="qualified"> | |
3 <xs:element name="army"> | |
4 <xs:complexType> | |
5 <xs:all> | |
6 <xs:element name="units" type="unitstype" minOccurs="1"/> | |
7 <xs:element name="customEquipment" type="customequipmenttype" minOccurs="1" /> | |
8 </xs:all> | |
9 <xs:attribute name="id" type="xs:ID" /> | |
10 <xs:attribute name="name" type="xs:string" use="required"/> | |
11 <xs:attribute name="system" type="xs:string" use="required"/> | |
12 <xs:attribute name="race" type="xs:string" use="required"/> | |
13 <xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/> | |
14 </xs:complexType> | |
15 </xs:element> | |
16 <xs:complexType name="unitstype"> | |
17 <xs:sequence> | |
18 <xs:element name="unit" type="unittype" minOccurs="0" maxOccurs="unbounded"/> | |
19 </xs:sequence> | |
20 </xs:complexType> | |
21 <xs:complexType name="unittype"> | |
22 <xs:all> | |
23 <xs:element name="equipment" type="equipmenttype" minOccurs="0" maxOccurs="1" /> | |
60
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
24 <xs:element name="contains" type="containstype" minOccurs="0" /> |
36 | 25 </xs:all> |
26 <xs:attribute name="id" type="xs:ID" /> | |
27 <xs:attribute name="unitType" type="xs:string" use="required"/> | |
28 <xs:attribute name="unitName" type="xs:string" use="required"/> | |
29 <xs:attribute name="size" type="xs:positiveInteger" use="required"/> | |
30 <xs:attribute name="race" type="xs:string" default=""/> | |
31 </xs:complexType> | |
32 <xs:complexType name="equipmenttype"> | |
33 <xs:sequence> | |
34 <xs:element name="equipItem" type="equipitemtype" minOccurs="1" maxOccurs="unbounded"/> | |
35 </xs:sequence> | |
36 </xs:complexType> | |
37 <xs:complexType name="equipitemtype"> | |
38 <xs:attribute name="id" type="xs:string" /> <!-- ID reference to either a custom equipment item or a Race equipment item --> | |
58
e53ed2d613a1
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
36
diff
changeset
|
39 <xs:attribute name="amount" type="core:nonNegativeDouble" use="required"/><!-- Double used to allow for percentages to be stored --> |
36 | 40 <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/> |
41 </xs:complexType> | |
60
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
42 <xs:complexType name="containstype"> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
43 <xs:sequence> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
44 <xs:element name="containedUnit" type="containedunittype"/> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
45 </xs:sequence> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
46 </xs:complexType> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
47 <xs:complexType name="containedunittype"> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
48 <xs:attribute name="containedID" type="xs:IDREF" use="required"/> |
0c3500fca49d
Re #61 - Complete structure of WarFoundry API objects
IBBoard <dev@ibboard.co.uk>
parents:
58
diff
changeset
|
49 </xs:complexType> |
36 | 50 <xs:complexType name="customequipmenttype"> |
51 <xs:sequence> | |
52 <xs:element name="customEquip" type="customequiptype" minOccurs="0" maxOccurs="unbounded"/> | |
53 </xs:sequence> | |
54 </xs:complexType> | |
55 <xs:complexType name="customequiptype"> | |
56 <xs:sequence> | |
57 <xs:element name="customEquipPart" type="customequipparttype" minOccurs="1" maxOccurs="unbounded"/> | |
58 </xs:sequence> | |
59 <xs:attribute name="id" type="xs:ID" /> | |
60 </xs:complexType> | |
61 <xs:complexType name="customequipparttype"> | |
62 <xs:attribute name="partIDRef" type="xs:string" /> | |
63 </xs:complexType> | |
64 </xs:schema> |