changeset 269:51d7b2b26882

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type * Remove unused keyrefs * Make ability uses key/keyref instead of ID/IDREF
author IBBoard <dev@ibboard.co.uk>
date Sat, 12 Jun 2010 20:32:49 +0000
parents d8e4eeb761c7
children b1c4241b8a2e
files schemas/race.xsd
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/schemas/race.xsd	Sat Jun 12 20:09:56 2010 +0000
+++ b/schemas/race.xsd	Sat Jun 12 20:32:49 2010 +0000
@@ -32,7 +32,7 @@
 									<xs:element name="description" type="xs:string" />
 									<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
 								</xs:sequence>
-								<xs:attribute name="id" type="xs:ID" use="required"/>
+								<xs:attribute name="id" type="xs:string" use="required"/>
 								<xs:attribute name="name" type="xs:string" use="required"/>
 								<xs:anyAttribute processContents="lax"/>
 							</xs:complexType>
@@ -56,10 +56,6 @@
 						</xs:element>						
 					</xs:sequence>
 				</xs:complexType>
-				<xs:key name="memberTypeID">
-					<xs:selector xpath="memberType"/>
-					<xs:field xpath="@id"/>
-				</xs:key>
 			</xs:element>
 			<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
 		</xs:sequence>
@@ -77,6 +73,14 @@
 		<xs:selector xpath="race:memberTypes/race:memberType"/>
 		<xs:field xpath="@id"/>
 	</xs:key>
+	<xs:keyref name="abilityRef" refer="abilityKey">
+		<xs:selector xpath="race:units/race:unit/race:unitAbilities/race:unitAbility"/>
+		<xs:field xpath="@abilityID"/>
+	</xs:keyref>
+	<xs:key name="abilityKey">
+		<xs:selector xpath="race:abilities/race:ability"/>
+		<xs:field xpath="@id"/>
+	</xs:key>
 </xs:element>
 
 <!--Reusable complex types -->
@@ -133,7 +137,7 @@
 							<xs:sequence>
 								<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
 							</xs:sequence>
-							<xs:attribute name="abilityID" type="xs:IDREF" />
+							<xs:attribute name="abilityID" type="xs:string" />
 							<xs:attribute name="required" type="xs:boolean" default="true"/>
 							<xs:anyAttribute processContents="lax"/>
 						</xs:complexType>
@@ -203,10 +207,6 @@
 							<xs:attribute name="typeID" type="xs:string" use="required"/>
 							<xs:anyAttribute processContents="lax"/>						
 						</xs:complexType>
-						<xs:keyref name="typeIDRef" refer="memberTypeID">
-							<xs:selector xpath="."/>
-							<xs:field xpath="@typeID"/>
-						</xs:keyref>
 					</xs:element>
 				</xs:sequence>
 			</xs:complexType>