view dtds/army.xsd @ 54:3a90f70dac73

Re #61 - Complete structure of WarFoundry API objects * Remove min/max from EquipmentItem and add description * Add min/max numbers and percentages to UnitEquipmentItem * Make Race schema define min/max number without the ratio (which is the percentage) * Replace use of EquipmentItem with UnitEquipmentItem because of increased use of UnitEquipmentItem for unit-specific data * Use doubles instead of floats for equipment amounts * Distinguish between ratio and absolute limits * Delete UnitEquipmentItemObj helper class that was purely used for UI Re #9 - Use smaller methods * Deprecate long Race and EquipmentItem constructors and ensure all getters/setters exist Also: * Migrate Unit to using genericed collections * Always use GameSystem object for Race, not ID string
author IBBoard <dev@ibboard.co.uk>
date Sun, 05 Apr 2009 13:45:23 +0000
parents 0a1c5fea6a08
children e53ed2d613a1
line wrap: on
line source

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/army" xmlns="http://ibboard.co.uk/warfoundry/army" elementFormDefault="qualified">
<xs:element name="army">
  <xs:complexType>
    <xs:all>
      <xs:element name="units" type="unitstype" minOccurs="1"/>
      <xs:element name="customEquipment" type="customequipmenttype" minOccurs="1" />
    </xs:all>
    <xs:attribute name="id" type="xs:ID" />
    <xs:attribute name="name" type="xs:string" use="required"/>
    <xs:attribute name="system" type="xs:string" use="required"/>
    <xs:attribute name="race" type="xs:string" use="required"/>
    <xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/>
  </xs:complexType>
</xs:element>
<xs:complexType name="unitstype">
  <xs:sequence>
    <xs:element name="unit" type="unittype" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="unittype">
  <xs:all>
    <xs:element name="equipment" type="equipmenttype" minOccurs="0" maxOccurs="1" />
  </xs:all>
  <xs:attribute name="id" type="xs:ID" />
  <xs:attribute name="unitType" type="xs:string" use="required"/>
  <xs:attribute name="unitName" type="xs:string" use="required"/>
  <xs:attribute name="size" type="xs:positiveInteger" use="required"/>
  <xs:attribute name="race" type="xs:string" default=""/>
</xs:complexType>
<xs:complexType name="equipmenttype">
  <xs:sequence>
    <xs:element name="equipItem" type="equipitemtype" minOccurs="1" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="equipitemtype">
  <xs:attribute name="id" type="xs:string" /> <!-- ID reference to either a custom equipment item or a Race equipment item -->
  <xs:attribute name="amount" type="xs:double" use="required"/><!-- Double used to allow for percentages to be stored -->
  <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/>
</xs:complexType>
<xs:complexType name="customequipmenttype">
  <xs:sequence>
    <xs:element name="customEquip" type="customequiptype" minOccurs="0" maxOccurs="unbounded"/>
  </xs:sequence>
</xs:complexType>
<xs:complexType name="customequiptype">
  <xs:sequence>
    <xs:element name="customEquipPart" type="customequipparttype" minOccurs="1" maxOccurs="unbounded"/>
  </xs:sequence>
  <xs:attribute name="id" type="xs:ID" />
</xs:complexType>
<xs:complexType name="customequipparttype">
  <xs:attribute name="partIDRef" type="xs:string" />
</xs:complexType>
</xs:schema>