changeset 22:28e99aa0053f

Re #34 - Migrate WarFoundry files to using Schemas * Rename WarFoundry-cats.xml to .xsd * Use "all" tag in System instead of "sequence" * Complete Race schema
author IBBoard <dev@ibboard.co.uk>
date Mon, 09 Mar 2009 20:45:45 +0000
parents 1e18de815472
children f9846f896df3
files dtds/race.xsd dtds/system.xsd dtds/warfoundry-cats.xml dtds/warfoundry-cats.xsd
diffstat 4 files changed, 145 insertions(+), 29 deletions(-) [+]
line diff
     1.1 --- a/dtds/race.xsd	Sat Mar 07 20:47:32 2009 +0000
     1.2 +++ b/dtds/race.xsd	Mon Mar 09 20:45:45 2009 +0000
     1.3 @@ -3,12 +3,12 @@
     1.4  targetNamespace="http://ibboard.co.uk/warfoundry/race" xmlns="http://ibboard.co.uk/warfoundry/race" elementFormDefault="qualified">
     1.5  <xs:element name="race">
     1.6    <xs:complexType>
     1.7 -    <xs:sequence>
     1.8 -      <xs:element name="units" type="unitstype"/>
     1.9 +    <xs:all>
    1.10 +      <xs:element name="units" type="unitstype" minOccurs="1"/>
    1.11        <xs:element name="categories" type="cats:categoriestype" />
    1.12        <xs:element name="equipment" type="equipmenttype" />
    1.13        <xs:element name="abilities" type="abilitiestype" />
    1.14 -    </xs:sequence>
    1.15 +    </xs:all>
    1.16      <xs:attribute name="id" type="xs:ID" />
    1.17      <xs:attribute name="subid" type="xs:string" default=""/>
    1.18      <xs:attribute name="name" type="xs:string" use="required"/>
    1.19 @@ -21,14 +21,15 @@
    1.20    </xs:sequence>
    1.21  </xs:complexType>
    1.22  <xs:complexType name="unittype">
    1.23 -  <xs:sequence>
    1.24 -    <xs:element name="unitCats" type="unitcatstype"/>
    1.25 -    <xs:element name="stats" type="statstype" />
    1.26 +  <xs:all>
    1.27 +    <xs:element name="stats" type="statstype" minOccurs="1" />
    1.28      <xs:element name="unitEquipment" type="unitequipmenttype" />
    1.29 +    <xs:element name="unitAbilities" type="unitabilitiestype" />
    1.30      <xs:element name="requirements" type="requirementstype" />
    1.31      <xs:element name="contains" type="containstype" />
    1.32 -    <xs:element name="requirements" type="requirementstype" />
    1.33 -  </xs:sequence>
    1.34 +    <xs:element name="extraData" type="extradatatype" />
    1.35 +    <xs:element name="notes" type="xsd:string" />
    1.36 +  </xs:all>
    1.37    <xs:attribute name="id" type="xs:ID" />
    1.38    <xs:attribute name="typeName" type="xs:string" use="required"/>
    1.39    <xs:attribute name="cat" type="xs:string" use="required"/>
    1.40 @@ -51,4 +52,119 @@
    1.41    </xs:simpleContent>
    1.42    <xs:attribute name="name" type="xs:string" use="required"/>
    1.43  </xs:complexType>
    1.44 +<xs:complexType name="unitequipmenttype">
    1.45 +  <xs:sequence>
    1.46 +    <xs:element name="unitEquipmentItem" type="unitequipmentitemtype" maxOccurs="unbounded"/>
    1.47 +  </xs:sequence>
    1.48 +</xs:complexType>
    1.49 +<xs:complexType name="unitequipmentitemtype">
    1.50 +  <xs:attribute name="equipID" type="xs:IDREF" />
    1.51 +  <xs:attribute name="required" type="xs:boolean" default="false"/>
    1.52 +  <xs:attribute name="exclusivityGroup" type="xs:string" default=""/>
    1.53 +  <xs:attribute name="minNumber" type="core:infiniteOrNonNegativeInteger" default="-1"/>
    1.54 +  <xs:attribute name="maxNumber" type="core:infiniteOrNonNegativeInteger" default="-1"/>
    1.55 +  <xs:attribute name="minPercentage" type="core:percentage" default="100"/>
    1.56 +  <xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
    1.57 +  <xs:attribute name="roundDirection" type="updowntype" default="up"/>
    1.58 +</xs:complexType>
    1.59 +<xs:complexType name="unitabilitiestype">
    1.60 +  <xs:sequence>
    1.61 +    <xs:element name="unitAbility" type="unitabilitytype" maxOccurs="unbounded"/>
    1.62 +  </xs:sequence>
    1.63 +</xs:complexType>
    1.64 +<xs:complexType name="unitabilitytype">
    1.65 +  <xs:attribute name="abilityID" type="xs:IDREF" />
    1.66 +  <xs:attribute name="required" type="xs:boolean" default="true"/>
    1.67 +</xs:complexType>
    1.68 +<xs:simpleType name="updowntype">
    1.69 +  <xs:restriction base="xs:string">
    1.70 +    <xs:enumeration value="up"/>
    1.71 +    <xs:enumeration value="down"/>
    1.72 +  </xs:restriction>
    1.73 +</xs:simpleType>
    1.74 +<xs:complexType name="requirementstype">
    1.75 +  <xs:sequence>
    1.76 +    <xs:element name="requirement" type="requirementtype"/>
    1.77 +  </xs:sequence>
    1.78 +</xs:complexType>
    1.79 +<xs:complexType name="requirementtype">
    1.80 +  <xs:simpleContent>
    1.81 +    <xs:extension base="xs:string"/>
    1.82 +  </xs:simpleContent>
    1.83 +  <xs:attribute name="requirementName" type="xs:string" use="required"/>
    1.84 +</xs:complexType>
    1.85 +<xs:complexType name="containstype">
    1.86 +  <xs:sequence>
    1.87 +    <xs:element name="containedUnit" type="containedunittype"/>
    1.88 +  </xs:sequence>
    1.89 +</xs:complexType>
    1.90 +<xs:complexType name="containedunittype">
    1.91 +  <xs:attribute name="containedID" type="xs:IDREF" use="required"/>
    1.92 +</xs:complexType>
    1.93 +<xs:complexType name="extradatatype">
    1.94 +  <xs:sequence>
    1.95 +    <xs:element name="data" type="extradatadatatype"/>
    1.96 +  </xs:sequence>
    1.97 +</xs:complexType>
    1.98 +<xs:complexType name="extradatadatatype">
    1.99 +  <xs:simpleContent>
   1.100 +    <xs:extension base="xs:string"/>
   1.101 +  </xs:simpleContent>
   1.102 +  <xs:attribute name="id" type="xs:ID" use="required"/>
   1.103 +</xs:complexType>
   1.104 +<xs:complexType name="equipmenttype">
   1.105 +  <xs:sequence>
   1.106 +    <xs:element name="equipmentItem" type="equipmentitemtype"/>
   1.107 +  </xs:sequence>
   1.108 +</xs:complexType>
   1.109 +<xs:complexType name="equipmentitemtype">
   1.110 +  <xs:all>
   1.111 +    <xs:element name="description" type="xsd:string" />
   1.112 +  </xs:all>
   1.113 +  <xs:attribute name="id" type="xs:ID" use="required"/>
   1.114 +  <xs:attribute name="name" type="xs:string" use="required"/>
   1.115 +  <xs:attribute name="points" type="core:nonNegativeDecimal" use="required"/>
   1.116 +</xs:complexType>
   1.117 +<xs:complexType name="equipmenttype">
   1.118 +  <xs:sequence>
   1.119 +    <xs:element name="equipmentItem" type="equipmentitemtype"/>
   1.120 +  </xs:sequence>
   1.121 +</xs:complexType>
   1.122 +<xs:complexType name="equipmentitemtype">
   1.123 +  <xs:all>
   1.124 +    <xs:element name="description" type="xsd:string" />
   1.125 +  </xs:all>
   1.126 +  <xs:attribute name="id" type="xs:ID" use="required"/>
   1.127 +  <xs:attribute name="name" type="xs:string" use="required"/>
   1.128 +  <xs:attribute name="points" type="core:nonNegativeDecimal" use="required"/>
   1.129 +  <xs:attribute name="armoutType" type="armourtype" default="none"/>
   1.130 +</xs:complexType>
   1.131 +<xs:simpleType name="armourtype">
   1.132 +  <xs:restriction base="xsd:string">
   1.133 +    <xs:enumeration value="None"/>
   1.134 +    <xs:enumeration value="Shield"/>
   1.135 +    <xs:enumeration value="LightArmour"/>
   1.136 +    <xs:enumeration value="LightArmourShield"/>
   1.137 +    <xs:enumeration value="HeavyArmour"/>
   1.138 +    <xs:enumeration value="HeavyArmourShield"/>
   1.139 +    <xs:enumeration value="Barding"/>
   1.140 +    <xs:enumeration value="BardingShield"/>
   1.141 +    <xs:enumeration value="BardingLightArmour"/>
   1.142 +    <xs:enumeration value="BardingLightArmourShield"/>
   1.143 +    <xs:enumeration value="BardingHeavyArmour"/>
   1.144 +    <xs:enumeration value="BardingHeavyArmourShield"/>
   1.145 +  </xs:restriction>
   1.146 +</xs:simpleType>
   1.147 +<xs:complexType name="abilitiestype">
   1.148 +  <xs:sequence>
   1.149 +    <xs:element name="ability" type="abilitytype"/>
   1.150 +  </xs:sequence>
   1.151 +</xs:complexType>
   1.152 +<xs:complexType name="abilitytype">
   1.153 +  <xs:all>
   1.154 +    <xs:element name="description" type="xsd:string" />
   1.155 +  </xs:all>
   1.156 +  <xs:attribute name="id" type="xs:ID" use="required"/>
   1.157 +  <xs:attribute name="name" type="xs:string" use="required"/>
   1.158 +</xs:complexType>
   1.159  </xs:schema>
   1.160 \ No newline at end of file
     2.1 --- a/dtds/system.xsd	Sat Mar 07 20:47:32 2009 +0000
     2.2 +++ b/dtds/system.xsd	Mon Mar 09 20:45:45 2009 +0000
     2.3 @@ -3,10 +3,10 @@
     2.4  targetNamespace="http://ibboard.co.uk/warfoundry/system" xmlns="http://ibboard.co.uk/warfoundry/system" elementFormDefault="qualified">
     2.5  <xs:element name="system">
     2.6    <xs:complexType>
     2.7 -    <xs:sequence>
     2.8 -      <xs:element name="categories" type="cats:categoriestype"/>
     2.9 -      <xs:element name="sysStatsList" type="statslisttype"/>
    2.10 -    </xs:sequence>
    2.11 +    <xs:all>
    2.12 +      <xs:element name="categories" type="cats:categoriestype" minOccurs="1"/>
    2.13 +      <xs:element name="sysStatsList" type="statslisttype" minOccurs="1"/>
    2.14 +    </xs:all>
    2.15      <xs:attribute name="id" type="xs:ID" />
    2.16      <xs:attribute name="name" type="xs:string" use="required"/>
    2.17      <xs:attribute name="warn" type="xs:boolean" default="false"/>
     3.1 --- a/dtds/warfoundry-cats.xml	Sat Mar 07 20:47:32 2009 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,17 +0,0 @@
     3.4 -<?xml version="1.0"?>
     3.5 -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/cats"
     3.6 -xmlns="http://ibboard.co.uk/warfoundry/cats"elementFormDefault="qualified">
     3.7 -<xs:complexType name="categoriestype">
     3.8 -  <xs:sequence>
     3.9 -    <xs:element name="cat" type="cattype" minOccurs="1" maxOccurs="unbounded"/>
    3.10 -  </xs:sequence>
    3.11 -</xs:complexType>
    3.12 -<xs:complexType name="cattype">
    3.13 -  <xs:attribute name="id" type="xs:ID" />   
    3.14 -  <xs:attribute name="name" type="xs:string" use="required"/>
    3.15 -  <xs:attribute name="minPoints" type="core:nonNegativeDecimal" default="0"/>
    3.16 -  <xs:attribute name="maxPoints" type="core:infiniteOrNonNegativeDecimal" default="-1"/>
    3.17 -  <xs:attribute name="minPercentage" type="core:percentage" default="0"/>
    3.18 -  <xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
    3.19 -</xs:complexType>
    3.20 -</xs:schema>
    3.21 \ No newline at end of file
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/dtds/warfoundry-cats.xsd	Mon Mar 09 20:45:45 2009 +0000
     4.3 @@ -0,0 +1,17 @@
     4.4 +<?xml version="1.0"?>
     4.5 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/cats"
     4.6 +xmlns="http://ibboard.co.uk/warfoundry/cats"elementFormDefault="qualified">
     4.7 +<xs:complexType name="categoriestype">
     4.8 +  <xs:sequence>
     4.9 +    <xs:element name="cat" type="cattype" minOccurs="1" maxOccurs="unbounded"/>
    4.10 +  </xs:sequence>
    4.11 +</xs:complexType>
    4.12 +<xs:complexType name="cattype">
    4.13 +  <xs:attribute name="id" type="xs:ID" />   
    4.14 +  <xs:attribute name="name" type="xs:string" use="required"/>
    4.15 +  <xs:attribute name="minPoints" type="core:nonNegativeDecimal" default="0"/>
    4.16 +  <xs:attribute name="maxPoints" type="core:infiniteOrNonNegativeDecimal" default="-1"/>
    4.17 +  <xs:attribute name="minPercentage" type="core:percentage" default="0"/>
    4.18 +  <xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
    4.19 +</xs:complexType>
    4.20 +</xs:schema>
    4.21 \ No newline at end of file