comparison schemas/system.xsd @ 276:d576034ad1dd

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type * Migrate to using keys and keyrefs for default stats sets Also: * Make sure that getting the default ID fully loads the file
author IBBoard <dev@ibboard.co.uk>
date Sun, 04 Jul 2010 19:10:33 +0000
parents 2f8fd45d55e2
children c1d55ea8a2a1
comparison
equal deleted inserted replaced
275:10fb73206bd2 276:d576034ad1dd
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/system" xmlns="http://ibboard.co.uk/warfoundry/system" elementFormDefault="qualified"> 3 targetNamespace="http://ibboard.co.uk/warfoundry/system" xmlns="http://ibboard.co.uk/warfoundry/system" xmlns:sys="http://ibboard.co.uk/warfoundry/system" elementFormDefault="qualified">
4 <xs:element name="system"> 4 <xs:element name="system">
5 <xs:complexType> 5 <xs:complexType>
6 <xs:sequence> 6 <xs:sequence>
7 <xs:element name="categories" type="cats:categoriestype"/> 7 <xs:element name="categories" type="cats:categoriestype"/>
8 <xs:element name="sysStatsList"> 8 <xs:element name="sysStatsList">
19 <xs:attribute name="name" type="xs:string" use="required"/> 19 <xs:attribute name="name" type="xs:string" use="required"/>
20 <xs:anyAttribute processContents="lax"/> 20 <xs:anyAttribute processContents="lax"/>
21 </xs:complexType> 21 </xs:complexType>
22 </xs:element> 22 </xs:element>
23 </xs:sequence> 23 </xs:sequence>
24 <xs:attribute name="id" type="xs:ID" /> 24 <xs:attribute name="id" type="xs:string" />
25 <xs:anyAttribute processContents="lax"/> 25 <xs:anyAttribute processContents="lax"/>
26 </xs:complexType> 26 </xs:complexType>
27 </xs:element> 27 </xs:element>
28 </xs:sequence> 28 </xs:sequence>
29 <xs:attribute name="defaultStats" type="xs:IDREF" use="required" /> 29 <xs:attribute name="defaultStats" type="xs:string" use="required" />
30 <xs:anyAttribute processContents="lax"/> 30 <xs:anyAttribute processContents="lax"/>
31 </xs:complexType> 31 </xs:complexType>
32 </xs:element> 32 </xs:element>
33 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 33 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
34 </xs:sequence> 34 </xs:sequence>
35 <xs:attribute name="id" type="xs:ID" /> 35 <xs:attribute name="id" type="xs:string" />
36 <xs:attribute name="name" type="xs:string" use="required"/> 36 <xs:attribute name="name" type="xs:string" use="required"/>
37 <xs:attribute name="warn" type="xs:boolean" default="false"/> 37 <xs:attribute name="warn" type="xs:boolean" default="false"/>
38 <xs:attribute name="allowAllies" type="xs:boolean" default="true"/> 38 <xs:attribute name="allowAllies" type="xs:boolean" default="true"/>
39 <xs:anyAttribute processContents="lax"/> 39 <xs:anyAttribute processContents="lax"/>
40 </xs:complexType> 40 </xs:complexType>
41 <xs:keyref name="defaultStatsRef" refer="statsKey">
42 <xs:selector xpath="sys:sysStatsList"/>
43 <xs:field xpath="@defaultStats"/>
44 </xs:keyref>
45 <xs:key name="statsKey">
46 <xs:selector xpath="sys:sysStatsList/sys:sysStats"/>
47 <xs:field xpath="@id"/>
48 </xs:key>
41 </xs:element> 49 </xs:element>
42 </xs:schema> 50 </xs:schema>