changeset 73:5eb1bc0a6d96

Re #80: Collapse XSD definitions * Collapse Race XSD definition
author IBBoard <dev@ibboard.co.uk>
date Sun, 10 May 2009 19:13:10 +0000
parents e7a6f460be57
children 76d274df9f28
files dtds/race.xsd
diffstat 1 files changed, 141 insertions(+), 123 deletions(-) [+]
line wrap: on
line diff
--- a/dtds/race.xsd	Sun May 10 18:43:17 2009 +0000
+++ b/dtds/race.xsd	Sun May 10 19:13:10 2009 +0000
@@ -4,10 +4,148 @@
 <xs:element name="race">
   <xs:complexType>
     <xs:all>
-      <xs:element name="units" type="unitstype" minOccurs="1"/>
+      <xs:element name="units" minOccurs="1">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="unit" minOccurs="1" maxOccurs="unbounded">
+              <xs:complexType>
+                <xs:all>
+                  <xs:element name="stats" minOccurs="1">
+                    <xs:complexType>
+                      <xs:sequence>
+                        <xs:element name="stat" minOccurs="1" maxOccurs="unbounded">
+                          <xs:complexType>
+                            <xs:simpleContent>
+                              <xs:extension base="xs:string">
+                                <xs:attribute name="name" type="xs:string" use="required"/>
+                                      </xs:extension>
+                            </xs:simpleContent>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
+                    </xs:complexType>
+                  </xs:element>
+                  <xs:element name="unitEquipment">
+                    <xs:complexType>
+                      <xs:sequence>
+                        <xs:element name="unitEquipmentItem" maxOccurs="unbounded">
+                          <xs:complexType>
+                            <xs:attribute name="id" type="xs:IDREF" />
+                            <xs:attribute name="required" type="xs:boolean" default="false"/>
+                            <xs:attribute name="exclusivityGroup" type="xs:string" default=""/>
+                            <xs:attribute name="minNum" type="core:nonNegativeOrInfiniteInteger" default="-1"/>
+                            <xs:attribute name="maxNum" type="core:nonNegativeOrInfiniteInteger" default="-1"/>
+                            <xs:attribute name="minPercentage" type="core:percentage" default="100"/>
+                            <xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
+                            <xs:attribute name="roundDirection" type="updowntype" default="up"/>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
+                    </xs:complexType>
+                  </xs:element>
+                  <xs:element name="unitAbilities" minOccurs="0">
+                    <xs:complexType>
+                      <xs:sequence>
+                        <xs:element name="unitAbility" maxOccurs="unbounded">
+                          <xs:complexType>
+                            <xs:attribute name="abilityID" type="xs:IDREF" />
+                            <xs:attribute name="required" type="xs:boolean" default="true"/>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
+                    </xs:complexType>
+                  </xs:element>
+                  <xs:element name="requirements" minOccurs="0">
+                    <xs:complexType>
+                      <xs:sequence>
+                        <xs:element name="requirement">
+                          <xs:complexType>
+                            <xs:simpleContent>
+                              <xs:extension base="xs:string">
+                                <xs:attribute name="requirementName" type="xs:string" use="required"/>
+                              </xs:extension>
+                            </xs:simpleContent>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
+                    </xs:complexType>
+                  </xs:element>
+                  <xs:element name="contains" minOccurs="0">
+                    <xs:complexType>
+                      <xs:sequence>
+                        <xs:element name="containedUnit">
+                          <xs:complexType>
+                            <xs:attribute name="containedID" type="xs:IDREF" use="required"/>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
+                    </xs:complexType>
+                  </xs:element>
+                  <xs:element name="extraData" minOccurs="0">
+                    <xs:complexType>
+                      <xs:sequence>
+                        <xs:element name="data">
+                          <xs:complexType>
+                            <xs:simpleContent>
+                              <xs:extension base="xs:string">
+                                <xs:attribute name="id" type="xs:ID" use="required"/>
+                              </xs:extension>
+                            </xs:simpleContent>
+                          </xs:complexType>
+                        </xs:element>
+                      </xs:sequence>
+                    </xs:complexType>
+                  </xs:element>
+                  <xs:element name="notes" type="xs:string" minOccurs="0" />
+                </xs:all>
+                <xs:attribute name="id" type="xs:ID" />
+                <xs:attribute name="typeName" type="xs:string" use="required"/>
+                <xs:attribute name="cat" type="xs:string" use="required"/>
+                <xs:attribute name="unitPoints" type="core:nonNegativeNonInfiniteDouble" default="0"/>
+                <xs:attribute name="points" type="core:nonNegativeNonInfiniteDouble" use="required"/>
+                <xs:attribute name="minNum" type="xs:nonNegativeInteger" default="0"/>
+                <xs:attribute name="maxNum" type="core:positiveOrInfiniteInteger" default="-1"/>
+                <xs:attribute name="minSize" type="xs:nonNegativeInteger" default="5"/>
+                <xs:attribute name="maxSize" type="core:positiveOrInfiniteInteger" default="-1"/>
+                <xs:attribute name="baseSize" type="xs:nonNegativeInteger" default="0"/>
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
       <xs:element name="categories" type="cats:categoriestype" minOccurs="0" />
-      <xs:element name="equipment" type="equipmenttype" minOccurs="0" />
-      <xs:element name="abilities" type="abilitiestype" minOccurs="0" />
+      <xs:element name="equipment" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="equipmentItem" maxOccurs="unbounded">
+              <xs:complexType>
+                <xs:all>
+                  <xs:element name="description" type="xs:string" minOccurs="0" />
+                </xs:all>
+                <xs:attribute name="id" type="xs:ID" use="required"/>
+                <xs:attribute name="name" type="xs:string" use="required"/>
+                <xs:attribute name="cost" type="core:nonNegativeNonInfiniteDouble" use="required"/>
+                <xs:attribute name="armourType" type="armourtype" default="None"/>
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="abilities" minOccurs="0">
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="ability">
+              <xs:complexType>
+                <xs:all>
+                  <xs:element name="description" type="xs:string" />
+                </xs:all>
+                <xs:attribute name="id" type="xs:ID" use="required"/>
+                <xs:attribute name="name" type="xs:string" use="required"/>
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
     </xs:all>
     <xs:attribute name="id" type="xs:ID" />
     <xs:attribute name="subid" type="xs:string" default=""/>
@@ -15,120 +153,12 @@
     <xs:attribute name="system" type="xs:string" use="required"/>
   </xs:complexType>
 </xs:element>
-<xs:complexType name="unitstype">
-  <xs:sequence>
-    <xs:element name="unit" type="unittype" minOccurs="1" maxOccurs="unbounded"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="unittype">
-  <xs:all>
-    <xs:element name="stats" type="statstype" minOccurs="1" />
-    <xs:element name="unitEquipment" type="unitequipmenttype" />
-    <xs:element name="unitAbilities" type="unitabilitiestype" minOccurs="0" />
-    <xs:element name="requirements" type="requirementstype" minOccurs="0" />
-    <xs:element name="contains" type="containstype" minOccurs="0" />
-    <xs:element name="extraData" type="extradatatype" minOccurs="0" />
-    <xs:element name="notes" type="xs:string" minOccurs="0" />
-  </xs:all>
-  <xs:attribute name="id" type="xs:ID" />
-  <xs:attribute name="typeName" type="xs:string" use="required"/>
-  <xs:attribute name="cat" type="xs:string" use="required"/>
-  <xs:attribute name="unitPoints" type="core:nonNegativeNonInfiniteDouble" default="0"/>
-  <xs:attribute name="points" type="core:nonNegativeNonInfiniteDouble" use="required"/>
-  <xs:attribute name="minNum" type="xs:nonNegativeInteger" default="0"/>
-  <xs:attribute name="maxNum" type="core:positiveOrInfiniteInteger" default="-1"/>
-  <xs:attribute name="minSize" type="xs:nonNegativeInteger" default="5"/>
-  <xs:attribute name="maxSize" type="core:positiveOrInfiniteInteger" default="-1"/>
-  <xs:attribute name="baseSize" type="xs:nonNegativeInteger" default="0"/>
-</xs:complexType>
-<xs:complexType name="statstype">
-  <xs:sequence>
-    <xs:element name="stat" type="stattype" minOccurs="1" maxOccurs="unbounded"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="stattype">
-  <xs:simpleContent>
-    <xs:extension base="xs:string">
-      <xs:attribute name="name" type="xs:string" use="required"/>
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-<xs:complexType name="unitequipmenttype">
-  <xs:sequence>
-    <xs:element name="unitEquipmentItem" type="unitequipmentitemtype" maxOccurs="unbounded"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="unitequipmentitemtype">
-  <xs:attribute name="id" type="xs:IDREF" />
-  <xs:attribute name="required" type="xs:boolean" default="false"/>
-  <xs:attribute name="exclusivityGroup" type="xs:string" default=""/>
-  <xs:attribute name="minNum" type="core:nonNegativeOrInfiniteInteger" default="-1"/>
-  <xs:attribute name="maxNum" type="core:nonNegativeOrInfiniteInteger" default="-1"/>
-  <xs:attribute name="minPercentage" type="core:percentage" default="100"/>
-  <xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
-  <xs:attribute name="roundDirection" type="updowntype" default="up"/>
-</xs:complexType>
-<xs:complexType name="unitabilitiestype">
-  <xs:sequence>
-    <xs:element name="unitAbility" type="unitabilitytype" maxOccurs="unbounded"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="unitabilitytype">
-  <xs:attribute name="abilityID" type="xs:IDREF" />
-  <xs:attribute name="required" type="xs:boolean" default="true"/>
-</xs:complexType>
 <xs:simpleType name="updowntype">
   <xs:restriction base="xs:string">
     <xs:enumeration value="up"/>
     <xs:enumeration value="down"/>
   </xs:restriction>
 </xs:simpleType>
-<xs:complexType name="requirementstype">
-  <xs:sequence>
-    <xs:element name="requirement" type="requirementtype"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="requirementtype">
-  <xs:simpleContent>
-    <xs:extension base="xs:string">
-      <xs:attribute name="requirementName" type="xs:string" use="required"/>
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-<xs:complexType name="containstype">
-  <xs:sequence>
-    <xs:element name="containedUnit" type="containedunittype"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="containedunittype">
-  <xs:attribute name="containedID" type="xs:IDREF" use="required"/>
-</xs:complexType>
-<xs:complexType name="extradatatype">
-  <xs:sequence>
-    <xs:element name="data" type="extradatadatatype"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="extradatadatatype">
-  <xs:simpleContent>
-    <xs:extension base="xs:string">
-      <xs:attribute name="id" type="xs:ID" use="required"/>
-    </xs:extension>
-  </xs:simpleContent>
-</xs:complexType>
-<xs:complexType name="equipmenttype">
-  <xs:sequence>
-    <xs:element name="equipmentItem" type="equipmentitemtype" maxOccurs="unbounded" />
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="equipmentitemtype">
-  <xs:all>
-    <xs:element name="description" type="xs:string" minOccurs="0" />
-  </xs:all>
-  <xs:attribute name="id" type="xs:ID" use="required"/>
-  <xs:attribute name="name" type="xs:string" use="required"/>
-  <xs:attribute name="cost" type="core:nonNegativeNonInfiniteDouble" use="required"/>
-  <xs:attribute name="armourType" type="armourtype" default="None"/>
-</xs:complexType>
 <xs:simpleType name="armourtype">
   <xs:restriction base="xs:string">
     <xs:enumeration value="None"/>
@@ -145,16 +175,4 @@
     <xs:enumeration value="BardingHeavyArmourShield"/>
   </xs:restriction>
 </xs:simpleType>
-<xs:complexType name="abilitiestype">
-  <xs:sequence>
-    <xs:element name="ability" type="abilitytype"/>
-  </xs:sequence>
-</xs:complexType>
-<xs:complexType name="abilitytype">
-  <xs:all>
-    <xs:element name="description" type="xs:string" />
-  </xs:all>
-  <xs:attribute name="id" type="xs:ID" use="required"/>
-  <xs:attribute name="name" type="xs:string" use="required"/>
-</xs:complexType>
 </xs:schema>
\ No newline at end of file