comparison dtds/army.xsd @ 72:e7a6f460be57

Re #80: Collapse XSD definitions * Collapse System definition * Collapse Army definition Also: * Fix namespace issue for "core" in army.xsd
author IBBoard <dev@ibboard.co.uk>
date Sun, 10 May 2009 18:43:17 +0000
parents 0c3500fca49d
children 76d274df9f28
comparison
equal deleted inserted replaced
71:0303ac938fc5 72:e7a6f460be57
1 <?xml version="1.0"?> 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"> 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" xmlns:core="http://ibboard.co.uk/warfoundry/core" elementFormDefault="qualified">
3 <xs:element name="army"> 3 <xs:element name="army">
4 <xs:complexType> 4 <xs:complexType>
5 <xs:all> 5 <xs:all>
6 <xs:element name="units" type="unitstype" minOccurs="1"/> 6 <xs:element name="units" minOccurs="1">
7 <xs:element name="customEquipment" type="customequipmenttype" minOccurs="1" /> 7 <xs:complexType>
8 <xs:sequence>
9 <xs:element name="unit" minOccurs="0" maxOccurs="unbounded">
10 <xs:complexType>
11 <xs:all>
12 <xs:element name="equipment" minOccurs="0" maxOccurs="1">
13 <xs:complexType>
14 <xs:sequence>
15 <xs:element name="equipItem" minOccurs="1" maxOccurs="unbounded">
16 <xs:complexType>
17 <xs:attribute name="id" type="xs:string" /> <!-- ID reference to either a custom equipment item or a Race equipment item -->
18 <xs:attribute name="amount" type="core:nonNegativeDouble" use="required"/><!-- Double used to allow for percentages to be stored -->
19 <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/>
20 </xs:complexType>
21 </xs:element>
22 </xs:sequence>
23 </xs:complexType>
24 </xs:element>
25 <xs:element name="contains" minOccurs="0">
26 <xs:complexType>
27 <xs:sequence>
28 <xs:element name="containedUnit">
29 <xs:complexType>
30 <xs:attribute name="containedID" type="xs:IDREF" use="required"/>
31 </xs:complexType>
32 </xs:element>
33 </xs:sequence>
34 </xs:complexType>
35 </xs:element>
36 </xs:all>
37 <xs:attribute name="id" type="xs:ID" />
38 <xs:attribute name="unitType" type="xs:string" use="required"/>
39 <xs:attribute name="unitName" type="xs:string" use="required"/>
40 <xs:attribute name="size" type="xs:positiveInteger" use="required"/>
41 <xs:attribute name="race" type="xs:string" default=""/>
42 </xs:complexType>
43 </xs:element>
44 </xs:sequence>
45 </xs:complexType>
46 </xs:element>
47 <xs:element name="customEquipment" minOccurs="1">
48 <xs:complexType>
49 <xs:sequence>
50 <xs:element name="customEquip" minOccurs="0" maxOccurs="unbounded">
51 <xs:complexType>
52 <xs:sequence>
53 <xs:element name="customEquipPart" minOccurs="1" maxOccurs="unbounded">
54 <xs:complexType>
55 <xs:attribute name="partIDRef" type="xs:string" />
56 </xs:complexType>
57 </xs:element>
58 </xs:sequence>
59 <xs:attribute name="id" type="xs:ID" />
60 </xs:complexType>
61 </xs:element>
62 </xs:sequence>
63 </xs:complexType>
64 </xs:element>
8 </xs:all> 65 </xs:all>
9 <xs:attribute name="id" type="xs:ID" /> 66 <xs:attribute name="id" type="xs:ID" />
10 <xs:attribute name="name" type="xs:string" use="required"/> 67 <xs:attribute name="name" type="xs:string" use="required"/>
11 <xs:attribute name="system" type="xs:string" use="required"/> 68 <xs:attribute name="system" type="xs:string" use="required"/>
12 <xs:attribute name="race" type="xs:string" use="required"/> 69 <xs:attribute name="race" type="xs:string" use="required"/>
13 <xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/> 70 <xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/>
14 </xs:complexType> 71 </xs:complexType>
15 </xs:element> 72 </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" />
24 <xs:element name="contains" type="containstype" minOccurs="0" />
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 -->
39 <xs:attribute name="amount" type="core:nonNegativeDouble" use="required"/><!-- Double used to allow for percentages to be stored -->
40 <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/>
41 </xs:complexType>
42 <xs:complexType name="containstype">
43 <xs:sequence>
44 <xs:element name="containedUnit" type="containedunittype"/>
45 </xs:sequence>
46 </xs:complexType>
47 <xs:complexType name="containedunittype">
48 <xs:attribute name="containedID" type="xs:IDREF" use="required"/>
49 </xs:complexType>
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> 73 </xs:schema>