comparison dtds/race.xsd @ 40:3664eee50390

Fixes #47 - remove magic numbers * Create "infinity" in core types * Redefine special core types without trying to use non-existant INF for Integers * Use new types in Cats and Race * Remove special handling of INF when parsing an integer attribute Closes #46 - Resolve problems using custom restrictions of decimal and double * New schemas seem to work without exceptioning
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Mar 2009 17:04:33 +0000
parents 548cfc776f54
children d0812d7de39d
comparison
equal deleted inserted replaced
39:05c6745cc660 40:3664eee50390
31 <xs:element name="notes" type="xs:string" minOccurs="0" /> 31 <xs:element name="notes" type="xs:string" minOccurs="0" />
32 </xs:all> 32 </xs:all>
33 <xs:attribute name="id" type="xs:ID" /> 33 <xs:attribute name="id" type="xs:ID" />
34 <xs:attribute name="typeName" type="xs:string" use="required"/> 34 <xs:attribute name="typeName" type="xs:string" use="required"/>
35 <xs:attribute name="cat" type="xs:string" use="required"/> 35 <xs:attribute name="cat" type="xs:string" use="required"/>
36 <xs:attribute name="unitPoints" type="core:nonNegativeDouble" default="0"/> 36 <xs:attribute name="unitPoints" type="core:nonNegativeNonInfiniteDouble" default="0"/>
37 <xs:attribute name="points" type="core:nonNegativeDouble" use="required"/> 37 <xs:attribute name="points" type="core:nonNegativeNonInfiniteDouble" use="required"/>
38 <xs:attribute name="minNum" type="xs:nonNegativeInteger" default="0"/> 38 <xs:attribute name="minNum" type="xs:nonNegativeInteger" default="0"/>
39 <xs:attribute name="maxNum" type="xs:positiveInteger" default="INF"/> 39 <xs:attribute name="maxNum" type="core:positiveOrInfiniteInteger" default="-1"/>
40 <xs:attribute name="minSize" type="xs:positiveInteger" default="5"/> 40 <xs:attribute name="minSize" type="xs:positiveInteger" default="5"/>
41 <xs:attribute name="maxSize" type="xs:positiveInteger" default="INF"/> 41 <xs:attribute name="maxSize" type="core:positiveOrInfiniteInteger" default="-1"/>
42 <xs:attribute name="baseSize" type="xs:nonNegativeInteger" default="0"/> 42 <xs:attribute name="baseSize" type="xs:nonNegativeInteger" default="0"/>
43 </xs:complexType> 43 </xs:complexType>
44 <xs:complexType name="statstype"> 44 <xs:complexType name="statstype">
45 <xs:sequence> 45 <xs:sequence>
46 <xs:element name="stat" type="stattype" minOccurs="1" maxOccurs="unbounded"/> 46 <xs:element name="stat" type="stattype" minOccurs="1" maxOccurs="unbounded"/>
60 </xs:complexType> 60 </xs:complexType>
61 <xs:complexType name="unitequipmentitemtype"> 61 <xs:complexType name="unitequipmentitemtype">
62 <xs:attribute name="id" type="xs:IDREF" /> 62 <xs:attribute name="id" type="xs:IDREF" />
63 <xs:attribute name="required" type="xs:boolean" default="false"/> 63 <xs:attribute name="required" type="xs:boolean" default="false"/>
64 <xs:attribute name="exclusivityGroup" type="xs:string" default=""/> 64 <xs:attribute name="exclusivityGroup" type="xs:string" default=""/>
65 <xs:attribute name="minNum" type="xs:positiveInteger" default="INF"/> 65 <xs:attribute name="minNum" type="core:positiveOrInfiniteInteger" default="-1"/>
66 <xs:attribute name="maxNum" type="xs:positiveInteger" default="INF"/> 66 <xs:attribute name="maxNum" type="core:positiveOrInfiniteInteger" default="-1"/>
67 <xs:attribute name="minPercentage" type="core:percentage" default="100"/> 67 <xs:attribute name="minPercentage" type="core:percentage" default="100"/>
68 <xs:attribute name="maxPercentage" type="core:percentage" default="100"/> 68 <xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
69 <xs:attribute name="roundDirection" type="updowntype" default="up"/> 69 <xs:attribute name="roundDirection" type="updowntype" default="up"/>
70 </xs:complexType> 70 </xs:complexType>
71 <xs:complexType name="unitabilitiestype"> 71 <xs:complexType name="unitabilitiestype">
124 <xs:all> 124 <xs:all>
125 <xs:element name="description" type="xs:string" minOccurs="0" /> 125 <xs:element name="description" type="xs:string" minOccurs="0" />
126 </xs:all> 126 </xs:all>
127 <xs:attribute name="id" type="xs:ID" use="required"/> 127 <xs:attribute name="id" type="xs:ID" use="required"/>
128 <xs:attribute name="name" type="xs:string" use="required"/> 128 <xs:attribute name="name" type="xs:string" use="required"/>
129 <xs:attribute name="cost" type="core:nonNegativeDouble" use="required"/> 129 <xs:attribute name="cost" type="core:nonNegativeNonInfiniteDouble" use="required"/>
130 <xs:attribute name="armoutType" type="armourtype" default="none"/> 130 <xs:attribute name="armoutType" type="armourtype" default="none"/>
131 </xs:complexType> 131 </xs:complexType>
132 <xs:simpleType name="armourtype"> 132 <xs:simpleType name="armourtype">
133 <xs:restriction base="xs:string"> 133 <xs:restriction base="xs:string">
134 <xs:enumeration value="None"/> 134 <xs:enumeration value="None"/>