annotate schemas/army.xsd @ 354:47acc63cf529

Re #27: Unit requirements * Bit mask the values with a bitwise AND rather than an OR
author IBBoard <dev@ibboard.co.uk>
date Fri, 22 Apr 2011 10:38:03 +0000
parents c7a95912c1e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 <?xml version="1.0"?>
277
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/army"
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
3 xmlns="http://ibboard.co.uk/warfoundry/army" xmlns:army="http://ibboard.co.uk/warfoundry/army" xmlns:core="http://ibboard.co.uk/warfoundry/core" elementFormDefault="qualified">
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 <xs:element name="army">
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 <xs:complexType>
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
6 <xs:sequence>
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 <xs:element name="units">
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 <xs:complexType>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 <xs:sequence>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
10 <xs:element name="unit" minOccurs="0" maxOccurs="unbounded" type="unit"/>
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 </xs:sequence>
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
12 <xs:anyAttribute processContents="lax"/>
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 </xs:complexType>
277
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
14 <xs:keyref name="containedUnitRef" refer="unitKey">
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
15 <xs:selector xpath="army:unit/army:contains/army:containedUnit"/>
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
16 <xs:field xpath="@containedID"/>
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
17 </xs:keyref>
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
18 <xs:key name="unitKey">
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
19 <xs:selector xpath="army:unit"/>
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
20 <xs:field xpath="@id"/>
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
21 </xs:key>
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 </xs:element>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
23 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
24 </xs:sequence>
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 <xs:attribute name="id" type="xs:ID" />
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 <xs:attribute name="name" type="xs:string" use="required"/>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 <xs:attribute name="system" type="xs:string" use="required"/>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 <xs:attribute name="race" type="xs:string" use="required"/>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 <xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
30 <xs:anyAttribute processContents="lax"/>
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 </xs:complexType>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 </xs:element>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
33
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
34 <!-- Re-usable complex types -->
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
35
243
b8883707c489 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 241
diff changeset
36 <xs:complexType name="unit">
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
37 <xs:sequence>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
38 <xs:element name="equipment" minOccurs="0">
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
39 <xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
40 <xs:sequence>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
41 <xs:element name="equipItem" maxOccurs="unbounded">
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
42 <xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
43 <xs:sequence>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
44 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
45 </xs:sequence>
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
46 <xs:attribute name="id" type="xs:string" use="required" />
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
47 <xs:attribute name="amount" type="core:nonNegativeOrInfiniteIntegerOrPercentage" use="required"/>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
48 <xs:attribute name="amountType" type="equipmentAmountType" default="ratio"/>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
49 <xs:anyAttribute processContents="lax"/>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
50 </xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
51 </xs:element>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
52 </xs:sequence>
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
53 <xs:anyAttribute processContents="lax"/>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
54 </xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
55 </xs:element>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
56 <xs:element name="contains" minOccurs="0">
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
57 <xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
58 <xs:sequence>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
59 <xs:element name="containedUnit">
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
60 <xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
61 <xs:sequence>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
62 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
63 </xs:sequence>
277
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
64 <xs:attribute name="containedID" type="xs:string" use="required"/>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
65 <xs:anyAttribute processContents="lax"/>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
66 </xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
67 </xs:element>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
68 </xs:sequence>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
69 </xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
70 </xs:element>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
71 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
249
2f8fd45d55e2 Fixes #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 244
diff changeset
72 </xs:sequence>
277
c7a95912c1e8 Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
IBBoard <dev@ibboard.co.uk>
parents: 259
diff changeset
73 <xs:attribute name="id" type="xs:string" use="required" />
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
74 <xs:attribute name="unitType" type="xs:string" use="required"/>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
75 <xs:attribute name="unitName" type="xs:string" use="required"/>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
76 <xs:attribute name="size" type="xs:positiveInteger" use="required"/>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
77 <xs:attribute name="race" type="xs:string" default=""/>
259
35dc06030355 Re #270: Add multiple categories to API
IBBoard <dev@ibboard.co.uk>
parents: 249
diff changeset
78 <xs:attribute name="category" type="xs:string" default=""/>
244
9e4a78464b1a Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 243
diff changeset
79 <xs:anyAttribute processContents="lax"/>
240
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
80 </xs:complexType>
38a4154c4537 Re #152: Test and fix extensibility of current schemas
IBBoard <dev@ibboard.co.uk>
parents: 224
diff changeset
81
224
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 <xs:simpleType name="equipmentAmountType">
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 <xs:restriction base="xs:string">
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 <xs:enumeration value="ratio"/>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 <xs:enumeration value="fixed"/>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 </xs:restriction>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 </xs:simpleType>
f097888efcfe Fixes #233: "unitPoints" attribute is badly named
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
88 </xs:schema>