annotate dtds/army.xsd @ 40:3664eee50390

Fixes #47 - remove magic numbers * Create "infinity" in core types * Redefine special core types without trying to use non-existant INF for Integers * Use new types in Cats and Race * Remove special handling of INF when parsing an integer attribute Closes #46 - Resolve problems using custom restrictions of decimal and double * New schemas seem to work without exceptioning
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Mar 2009 17:04:33 +0000
parents 0a1c5fea6a08
children e53ed2d613a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 <?xml version="1.0"?>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
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">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 <xs:element name="army">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 <xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 <xs:all>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 <xs:element name="units" type="unitstype" minOccurs="1"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 <xs:element name="customEquipment" type="customequipmenttype" minOccurs="1" />
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 </xs:all>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 <xs:attribute name="id" type="xs:ID" />
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 <xs:attribute name="name" type="xs:string" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 <xs:attribute name="system" type="xs:string" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 <xs:attribute name="race" type="xs:string" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 <xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 </xs:element>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 <xs:complexType name="unitstype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 <xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 <xs:element name="unit" type="unittype" minOccurs="0" maxOccurs="unbounded"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 </xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 <xs:complexType name="unittype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 <xs:all>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 <xs:element name="equipment" type="equipmenttype" minOccurs="0" maxOccurs="1" />
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 </xs:all>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 <xs:attribute name="id" type="xs:ID" />
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 <xs:attribute name="unitType" type="xs:string" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 <xs:attribute name="unitName" type="xs:string" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 <xs:attribute name="size" type="xs:positiveInteger" use="required"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 <xs:attribute name="race" type="xs:string" default=""/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 <xs:complexType name="equipmenttype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 <xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33 <xs:element name="equipItem" type="equipitemtype" minOccurs="1" maxOccurs="unbounded"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 </xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 <xs:complexType name="equipitemtype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 <xs:attribute name="id" type="xs:string" /> <!-- ID reference to either a custom equipment item or a Race equipment item -->
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 <xs:attribute name="amount" type="xs:double" use="required"/><!-- Double used to allow for percentages to be stored -->
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 <xs:complexType name="customequipmenttype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 <xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 <xs:element name="customEquip" type="customequiptype" minOccurs="0" maxOccurs="unbounded"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 </xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 <xs:complexType name="customequiptype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47 <xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 <xs:element name="customEquipPart" type="customequipparttype" minOccurs="1" maxOccurs="unbounded"/>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 </xs:sequence>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 <xs:attribute name="id" type="xs:ID" />
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 <xs:complexType name="customequipparttype">
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53 <xs:attribute name="partIDRef" type="xs:string" />
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 </xs:complexType>
0a1c5fea6a08 Re #32 - Migrate to schemas
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 </xs:schema>