changeset 270:b1c4241b8a2e

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type * Migrate unit equipment item references to key/keyref
author IBBoard <dev@ibboard.co.uk>
date Mon, 14 Jun 2010 19:42:53 +0000
parents 51d7b2b26882
children da286069b9c6
files schemas/race.xsd
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/schemas/race.xsd	Sat Jun 12 20:32:49 2010 +0000
+++ b/schemas/race.xsd	Mon Jun 14 19:42:53 2010 +0000
@@ -81,6 +81,14 @@
 		<xs:selector xpath="race:abilities/race:ability"/>
 		<xs:field xpath="@id"/>
 	</xs:key>
+	<xs:keyref name="equipmentItemRef" refer="equipmentItemKey">
+		<xs:selector xpath="race:units/race:unit/race:unitEquipment/race:unitEquipmentItem"/>
+		<xs:field xpath="@id"/>
+	</xs:keyref>
+	<xs:key name="equipmentItemKey">
+		<xs:selector xpath="race:equipment/race:equipmentItem"/>
+		<xs:field xpath="@id"/>
+	</xs:key>
 </xs:element>
 
 <!--Reusable complex types -->
@@ -113,7 +121,7 @@
 								<xs:element name="maxLimit" minOccurs="0" type="core:limit" />
 								<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
 							</xs:sequence>
-							<xs:attribute name="id" type="xs:IDREF" />
+							<xs:attribute name="id" type="xs:string" use="required" />
 							<xs:attribute name="required" type="xs:boolean" default="false"/>
 							<!-- exclusivityGroup is deprecated in favour of the comma-separated exclusivityGroups -->
 							<xs:attribute name="exclusivityGroup" type="xs:string" default=""/>
@@ -267,7 +275,7 @@
 					<xs:element name="description" type="xs:string" minOccurs="0" />
 					<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:attribute name="cost" type="core:nonNegativeNonInfiniteDouble" use="required"/>
 				<xs:anyAttribute processContents="lax"/>