Mercurial > repos > IBBoard.WarFoundry.API
comparison schemas/race.xsd @ 267:3f14a792fd41
Re #274: Crash when missing unit member ID
* Add key and keyref for member type
Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
* Move keyref and key for equipment slot to correct place to be valid
* Add aliased xmlns for schema to allow for use in XPath, which doesn't use default namespace
* Disable warning reporting until Mono Bug 613684 is fixed (https://bugzilla.novell.com/show_bug.cgi?id=613684)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 12 Jun 2010 19:49:32 +0000 |
parents | 7933d852181e |
children | 51d7b2b26882 |
comparison
equal
deleted
inserted
replaced
266:a3c1bf57fd3f | 267:3f14a792fd41 |
---|---|
1 <?xml version="1.0"?> | 1 <?xml version="1.0"?> |
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="http://ibboard.co.uk/warfoundry/core" xmlns:cats="http://ibboard.co.uk/warfoundry/cats" | 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="http://ibboard.co.uk/warfoundry/core" xmlns:cats="http://ibboard.co.uk/warfoundry/cats" |
3 targetNamespace="http://ibboard.co.uk/warfoundry/race" xmlns="http://ibboard.co.uk/warfoundry/race" elementFormDefault="qualified"> | 3 targetNamespace="http://ibboard.co.uk/warfoundry/race" xmlns="http://ibboard.co.uk/warfoundry/race" xmlns:race="http://ibboard.co.uk/warfoundry/race" elementFormDefault="qualified"> |
4 <xs:element name="race"> | 4 <xs:element name="race"> |
5 <xs:complexType> | 5 <xs:complexType> |
6 <xs:sequence> | 6 <xs:sequence> |
7 <xs:element name="categories" type="cats:categoriestype" minOccurs="0" /> | 7 <xs:element name="categories" type="cats:categoriestype" minOccurs="0" /> |
8 <xs:element name="units"> | 8 <xs:element name="units"> |
9 <xs:complexType> | 9 <xs:complexType> |
10 <xs:sequence> | 10 <xs:sequence> |
11 <xs:element name="unit" maxOccurs="unbounded" type="unit"/> | 11 <xs:element name="unit" maxOccurs="unbounded" type="unit"> |
12 <xs:keyref name="equipSlotRef" refer="equipSlotKey"> | |
13 <xs:selector xpath="race:unitEquipment/race:unitEquipmentItem"/> | |
14 <xs:field xpath="@equipmentSlot"/> | |
15 </xs:keyref> | |
16 <xs:key name="equipSlotKey"> | |
17 <xs:selector xpath="race:equipmentSlots/race:equipmentSlot"/> | |
18 <xs:field xpath="@name"/> | |
19 </xs:key> | |
20 </xs:element> | |
12 </xs:sequence> | 21 </xs:sequence> |
13 </xs:complexType> | 22 </xs:complexType> |
14 </xs:element> | 23 </xs:element> |
15 <xs:element name="equipment" minOccurs="0" type="equipment"> | 24 <xs:element name="equipment" minOccurs="0" type="equipment"> |
16 </xs:element> | 25 </xs:element> |
58 <xs:attribute name="subid" type="xs:string" default=""/> | 67 <xs:attribute name="subid" type="xs:string" default=""/> |
59 <xs:attribute name="name" type="xs:string" use="required"/> | 68 <xs:attribute name="name" type="xs:string" use="required"/> |
60 <xs:attribute name="system" type="xs:string" use="required"/> | 69 <xs:attribute name="system" type="xs:string" use="required"/> |
61 <xs:anyAttribute processContents="lax"/> | 70 <xs:anyAttribute processContents="lax"/> |
62 </xs:complexType> | 71 </xs:complexType> |
72 <xs:keyref name="memberTypeRef" refer="memberTypeKey"> | |
73 <xs:selector xpath="race:units/race:unit/race:unitMembers/race:unitMember"/> | |
74 <xs:field xpath="@typeID"/> | |
75 </xs:keyref> | |
76 <xs:key name="memberTypeKey"> | |
77 <xs:selector xpath="race:memberTypes/race:memberType"/> | |
78 <xs:field xpath="@id"/> | |
79 </xs:key> | |
63 </xs:element> | 80 </xs:element> |
64 | 81 |
65 <!--Reusable complex types --> | 82 <!--Reusable complex types --> |
66 <xs:complexType name="unit"> | 83 <xs:complexType name="unit"> |
67 <xs:sequence> | 84 <xs:sequence> |
79 <xs:anyAttribute processContents="lax"/> | 96 <xs:anyAttribute processContents="lax"/> |
80 </xs:complexType> | 97 </xs:complexType> |
81 </xs:element> | 98 </xs:element> |
82 </xs:sequence> | 99 </xs:sequence> |
83 </xs:complexType> | 100 </xs:complexType> |
84 <xs:key name="equipSlotName"> | |
85 <xs:selector xpath="equipmentSlot"/> | |
86 <xs:field xpath="@name"/> | |
87 </xs:key> | |
88 </xs:element> | 101 </xs:element> |
89 <xs:element name="unitEquipment" minOccurs="0"> | 102 <xs:element name="unitEquipment" minOccurs="0"> |
90 <xs:complexType> | 103 <xs:complexType> |
91 <xs:sequence> | 104 <xs:sequence> |
92 <xs:element name="unitEquipmentItem" maxOccurs="unbounded"> | 105 <xs:element name="unitEquipmentItem" maxOccurs="unbounded"> |
105 <xs:attribute name="roundDirection" type="core:updowntype" default="up"/> | 118 <xs:attribute name="roundDirection" type="core:updowntype" default="up"/> |
106 <xs:attribute name="costMultiplier" type="core:nonNegativeDouble" default="1"/> | 119 <xs:attribute name="costMultiplier" type="core:nonNegativeDouble" default="1"/> |
107 <xs:attribute name="costRounding" type="costroundingtype" default="UpToHalf"/> | 120 <xs:attribute name="costRounding" type="costroundingtype" default="UpToHalf"/> |
108 <xs:anyAttribute processContents="lax"/> | 121 <xs:anyAttribute processContents="lax"/> |
109 </xs:complexType> | 122 </xs:complexType> |
110 <xs:keyref name="equipmentSlot" refer="equipSlotName"> | |
111 <xs:selector xpath="."/> | |
112 <xs:field xpath="@equipmentSlot"/> | |
113 </xs:keyref> | |
114 </xs:element> | 123 </xs:element> |
115 </xs:sequence> | 124 </xs:sequence> |
116 <xs:anyAttribute processContents="lax"/> | 125 <xs:anyAttribute processContents="lax"/> |
117 </xs:complexType> | 126 </xs:complexType> |
118 </xs:element> | 127 </xs:element> |