comparison schemas/army.xsd @ 277:c7a95912c1e8

Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type * Migrate army containership to key/keyref
author IBBoard <dev@ibboard.co.uk>
date Sun, 04 Jul 2010 20:03:32 +0000
parents 35dc06030355
children
comparison
equal deleted inserted replaced
276:d576034ad1dd 277:c7a95912c1e8
1 <?xml version="1.0"?> 1 <?xml version="1.0"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/army" xmlns="http://ibboard.co.uk/warfoundry/army" xmlns:core="http://ibboard.co.uk/warfoundry/core" elementFormDefault="qualified"> 2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/army"
3 xmlns="http://ibboard.co.uk/warfoundry/army" xmlns:army="http://ibboard.co.uk/warfoundry/army" xmlns:core="http://ibboard.co.uk/warfoundry/core" elementFormDefault="qualified">
3 <xs:element name="army"> 4 <xs:element name="army">
4 <xs:complexType> 5 <xs:complexType>
5 <xs:sequence> 6 <xs:sequence>
6 <xs:element name="units"> 7 <xs:element name="units">
7 <xs:complexType> 8 <xs:complexType>
8 <xs:sequence> 9 <xs:sequence>
9 <xs:element name="unit" minOccurs="0" maxOccurs="unbounded" type="unit"/> 10 <xs:element name="unit" minOccurs="0" maxOccurs="unbounded" type="unit"/>
10 </xs:sequence> 11 </xs:sequence>
11 <xs:anyAttribute processContents="lax"/> 12 <xs:anyAttribute processContents="lax"/>
12 </xs:complexType> 13 </xs:complexType>
13 </xs:element> 14 <xs:keyref name="containedUnitRef" refer="unitKey">
14 <xs:element name="customEquipment" minOccurs="0"> 15 <xs:selector xpath="army:unit/army:contains/army:containedUnit"/>
15 <xs:complexType> 16 <xs:field xpath="@containedID"/>
16 <xs:sequence> 17 </xs:keyref>
17 <xs:element name="customEquip" minOccurs="0" maxOccurs="unbounded"> 18 <xs:key name="unitKey">
18 <xs:complexType> 19 <xs:selector xpath="army:unit"/>
19 <xs:sequence> 20 <xs:field xpath="@id"/>
20 <xs:element name="customEquipPart" maxOccurs="unbounded"> 21 </xs:key>
21 <xs:complexType>
22 <xs:sequence>
23 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
24 </xs:sequence>
25 <xs:attribute name="partIDRef" type="xs:string" />
26 <xs:anyAttribute processContents="lax"/>
27 </xs:complexType>
28 </xs:element>
29 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
30 </xs:sequence>
31 <xs:attribute name="id" type="xs:ID" />
32 <xs:anyAttribute processContents="lax"/>
33 </xs:complexType>
34 </xs:element>
35 </xs:sequence>
36 <xs:anyAttribute processContents="lax"/>
37 </xs:complexType>
38 </xs:element> 22 </xs:element>
39 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 23 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
40 </xs:sequence> 24 </xs:sequence>
41 <xs:attribute name="id" type="xs:ID" /> 25 <xs:attribute name="id" type="xs:ID" />
42 <xs:attribute name="name" type="xs:string" use="required"/> 26 <xs:attribute name="name" type="xs:string" use="required"/>
60 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 44 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
61 </xs:sequence> 45 </xs:sequence>
62 <xs:attribute name="id" type="xs:string" use="required" /> 46 <xs:attribute name="id" type="xs:string" use="required" />
63 <xs:attribute name="amount" type="core:nonNegativeOrInfiniteIntegerOrPercentage" use="required"/> 47 <xs:attribute name="amount" type="core:nonNegativeOrInfiniteIntegerOrPercentage" use="required"/>
64 <xs:attribute name="amountType" type="equipmentAmountType" default="ratio"/> 48 <xs:attribute name="amountType" type="equipmentAmountType" default="ratio"/>
65 <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/>
66 <xs:anyAttribute processContents="lax"/> 49 <xs:anyAttribute processContents="lax"/>
67 </xs:complexType> 50 </xs:complexType>
68 </xs:element> 51 </xs:element>
69 </xs:sequence> 52 </xs:sequence>
70 <xs:anyAttribute processContents="lax"/> 53 <xs:anyAttribute processContents="lax"/>
76 <xs:element name="containedUnit"> 59 <xs:element name="containedUnit">
77 <xs:complexType> 60 <xs:complexType>
78 <xs:sequence> 61 <xs:sequence>
79 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 62 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
80 </xs:sequence> 63 </xs:sequence>
81 <xs:attribute name="containedID" type="xs:IDREF" use="required"/> 64 <xs:attribute name="containedID" type="xs:string" use="required"/>
82 <xs:anyAttribute processContents="lax"/> 65 <xs:anyAttribute processContents="lax"/>
83 </xs:complexType> 66 </xs:complexType>
84 </xs:element> 67 </xs:element>
85 </xs:sequence> 68 </xs:sequence>
86 </xs:complexType> 69 </xs:complexType>
87 </xs:element> 70 </xs:element>
88 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> 71 <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
89 </xs:sequence> 72 </xs:sequence>
90 <xs:attribute name="id" type="xs:ID" /> 73 <xs:attribute name="id" type="xs:string" use="required" />
91 <xs:attribute name="unitType" type="xs:string" use="required"/> 74 <xs:attribute name="unitType" type="xs:string" use="required"/>
92 <xs:attribute name="unitName" type="xs:string" use="required"/> 75 <xs:attribute name="unitName" type="xs:string" use="required"/>
93 <xs:attribute name="size" type="xs:positiveInteger" use="required"/> 76 <xs:attribute name="size" type="xs:positiveInteger" use="required"/>
94 <xs:attribute name="race" type="xs:string" default=""/> 77 <xs:attribute name="race" type="xs:string" default=""/>
95 <xs:attribute name="category" type="xs:string" default=""/> 78 <xs:attribute name="category" type="xs:string" default=""/>