diff schemas/race.xsd @ 272:166d01079acf

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type * Make extraData use local keys instead of global IDs * Change army to using a string, since we don't care what it is Also: * Implement loading of extra data so we can test it is loaded
author IBBoard <dev@ibboard.co.uk>
date Sat, 19 Jun 2010 15:50:05 +0000
parents da286069b9c6
children 3157ac054461
line wrap: on
line diff
--- a/schemas/race.xsd	Mon Jun 14 19:56:10 2010 +0000
+++ b/schemas/race.xsd	Sat Jun 19 15:50:05 2010 +0000
@@ -59,7 +59,7 @@
 			</xs:element>
 			<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
 		</xs:sequence>
-		<xs:attribute name="id" type="xs:ID" />
+		<xs:attribute name="id" type="xs:string" use="required" />
 		<xs:attribute name="subid" type="xs:string" default=""/>
 		<xs:attribute name="name" type="xs:string" use="required"/>
 		<xs:attribute name="system" type="xs:string" use="required"/>
@@ -211,6 +211,10 @@
 				</xs:sequence>
 				<xs:anyAttribute processContents="lax"/>
 			</xs:complexType>
+			<xs:key name="extraDataKey">
+				<xs:selector xpath="race:data"/>
+				<xs:field xpath="@id"/>
+			</xs:key>	
 		</xs:element>
 		<xs:element name="unitMembers" minOccurs="0">
 			<xs:complexType>