changeset 21:1e18de815472

Re #32 - Migrate WarFoundry to schemas * Add "WarFoundry-Core" schema to define numerical types with -1 taking a special value * Add "WarFoundry-Cats" to store common category definition between race and system * Add full system schema * Add partial implementation of race schema Re #34 - Remove choices and base/increment * "WarFoundry-Cats" schema only includes min/max points and percentage
author IBBoard <dev@ibboard.co.uk>
date Sat, 07 Mar 2009 20:47:32 +0000
parents b7c93a5821cd
children 28e99aa0053f
files dtds/race.xsd dtds/system.xsd dtds/warfoundry-cats.xml dtds/warfoundry-core.xsd
diffstat 4 files changed, 126 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dtds/race.xsd	Sat Mar 07 20:47:32 2009 +0000
     1.3 @@ -0,0 +1,54 @@
     1.4 +<?xml version="1.0"?>
     1.5 +<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"
     1.6 +targetNamespace="http://ibboard.co.uk/warfoundry/race" xmlns="http://ibboard.co.uk/warfoundry/race" elementFormDefault="qualified">
     1.7 +<xs:element name="race">
     1.8 +  <xs:complexType>
     1.9 +    <xs:sequence>
    1.10 +      <xs:element name="units" type="unitstype"/>
    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:attribute name="id" type="xs:ID" />
    1.16 +    <xs:attribute name="subid" type="xs:string" default=""/>
    1.17 +    <xs:attribute name="name" type="xs:string" use="required"/>
    1.18 +    <xs:attribute name="system" type="xs:string" use="required"/>
    1.19 +  </xs:complexType>
    1.20 +</xs:element>
    1.21 +<xs:complexType name="unitstype">
    1.22 +  <xs:sequence>
    1.23 +    <xs:element name="unit" type="unittype" minOccurs="1" maxOccurs="unbounded"/>
    1.24 +  </xs:sequence>
    1.25 +</xs:complexType>
    1.26 +<xs:complexType name="unittype">
    1.27 +  <xs:sequence>
    1.28 +    <xs:element name="unitCats" type="unitcatstype"/>
    1.29 +    <xs:element name="stats" type="statstype" />
    1.30 +    <xs:element name="unitEquipment" type="unitequipmenttype" />
    1.31 +    <xs:element name="requirements" type="requirementstype" />
    1.32 +    <xs:element name="contains" type="containstype" />
    1.33 +    <xs:element name="requirements" type="requirementstype" />
    1.34 +  </xs:sequence>
    1.35 +  <xs:attribute name="id" type="xs:ID" />
    1.36 +  <xs:attribute name="typeName" type="xs:string" use="required"/>
    1.37 +  <xs:attribute name="cat" type="xs:string" use="required"/>
    1.38 +  <xs:attribute name="unitPoints" type="core:nonNegativeDecimal" default="0"/>
    1.39 +  <xs:attribute name="points" type="core:nonNegativeDecimal" use="required"/>
    1.40 +  <xs:attribute name="minNumber" type="core:nonNegativeInteger" default="0"/>
    1.41 +  <xs:attribute name="maxNumber" type="core:infiniteOrNonNegativeInteger" default="-1"/>
    1.42 +  <xs:attribute name="minSize" type="core:positiveInteger" default="5"/>
    1.43 +  <xs:attribute name="maxSize" type="core:infiniteOrNonNegativeInteger" default="-1"/>
    1.44 +  <xs:attribute name="baseSize" type="xsd:nonNegativeInteger" default="0"/>
    1.45 +</xs:complexType>
    1.46 +<xs:complexType name="statstype">
    1.47 +  <xs:sequence>
    1.48 +    <xs:element name="stat" type="stattype" minOccurs="1" maxOccurs="unbounded"/>
    1.49 +  </xs:sequence>
    1.50 +</xs:complexType>
    1.51 +<xs:complexType name="stattype">
    1.52 +  <xs:simpleContent>
    1.53 +    <xs:extension base="xs:string"/>
    1.54 +  </xs:simpleContent>
    1.55 +  <xs:attribute name="name" type="xs:string" use="required"/>
    1.56 +</xs:complexType>
    1.57 +</xs:schema>
    1.58 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/dtds/system.xsd	Sat Mar 07 20:47:32 2009 +0000
     2.3 @@ -0,0 +1,30 @@
     2.4 +<?xml version="1.0"?>
     2.5 +<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.6 +targetNamespace="http://ibboard.co.uk/warfoundry/system" xmlns="http://ibboard.co.uk/warfoundry/system" elementFormDefault="qualified">
     2.7 +<xs:element name="system">
     2.8 +  <xs:complexType>
     2.9 +    <xs:sequence>
    2.10 +      <xs:element name="categories" type="cats:categoriestype"/>
    2.11 +      <xs:element name="sysStatsList" type="statslisttype"/>
    2.12 +    </xs:sequence>
    2.13 +    <xs:attribute name="id" type="xs:ID" />
    2.14 +    <xs:attribute name="name" type="xs:string" use="required"/>
    2.15 +    <xs:attribute name="warn" type="xs:boolean" default="false"/>
    2.16 +    <xs:attribute name="allowAllies" type="xs:boolean" default="true"/>
    2.17 +  </xs:complexType>
    2.18 +</xs:element>
    2.19 +<xs:complexType name="statslisttype">
    2.20 +  <xs:sequence>
    2.21 +    <xs:element name="sysStats" type="sysstatstype" minOccurs="1" maxOccurs="unbounded"/>
    2.22 +  </xs:sequence>
    2.23 +</xs:complexType>
    2.24 +<xs:complexType name="sysstatstype">
    2.25 +  <xs:sequence>
    2.26 +    <xs:element name="sysStat" type="sysstattype" minOccurs="1" maxOccurs="unbounded"/>
    2.27 +  </xs:sequence>
    2.28 +  <xs:attribute name="id" type="xs:ID" />   
    2.29 +</xs:complexType>
    2.30 +<xs:complexType name="sysstattype">
    2.31 +  <xs:attribute name="name" type="xs:string" use="required"/>
    2.32 +</xs:complexType>
    2.33 +</xs:schema>
    2.34 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/dtds/warfoundry-cats.xml	Sat Mar 07 20:47:32 2009 +0000
     3.3 @@ -0,0 +1,17 @@
     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-core.xsd	Sat Mar 07 20:47:32 2009 +0000
     4.3 @@ -0,0 +1,25 @@
     4.4 +<?xml version="1.0"?>
     4.5 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/core"
     4.6 +xmlns="http://ibboard.co.uk/warfoundry/core"elementFormDefault="qualified">
     4.7 +<xs:simpleType name="infiniteOrNonNegativeDecimal">
     4.8 +  <xs:restriction base="xs:decimal">
     4.9 +    <xs:minInclusive value="-1"/>
    4.10 +  </xs:restriction>
    4.11 +</xs:simpleType>
    4.12 +<xs:simpleType name="infiniteOrNonNegativeInteger">
    4.13 +  <xs:restriction base="xs:integer">
    4.14 +    <xs:minInclusive value="-1"/>
    4.15 +  </xs:restriction>
    4.16 +</xs:simpleType>
    4.17 +<xs:simpleType name="nonNegativeDecimal">
    4.18 +  <xs:restriction base="xs:decimal">
    4.19 +    <xs:minInclusive value="0"/>
    4.20 +  </xs:restriction>
    4.21 +</xs:simpleType>
    4.22 +<xs:simpleType name="percentage">
    4.23 +  <xs:restriction base="xs:decimal">
    4.24 +    <xs:minInclusive value="0"/>
    4.25 +    <xs:maxInclusive value="100"/>
    4.26 +  </xs:restriction>
    4.27 +</xs:simpleType>
    4.28 +</xs:schema>
    4.29 \ No newline at end of file