diff dtds/warfoundry-core.xsd @ 176:22429737cd77

Re #198: Add slots with counts to units * Migrate to using new Limit objects from ibboard:ticket:24 * Parse new objects * Move more data type definitions in to Core schema for re-use * Make UnitType just return limit objects
author IBBoard <dev@ibboard.co.uk>
date Thu, 22 Oct 2009 19:51:42 +0000
parents 41b927998a41
children 36adabb1c3ea
line wrap: on
line diff
--- a/dtds/warfoundry-core.xsd	Wed Oct 21 19:01:13 2009 +0000
+++ b/dtds/warfoundry-core.xsd	Thu Oct 22 19:51:42 2009 +0000
@@ -7,7 +7,35 @@
 			<xs:any minOccurs="0" maxOccurs="unbounded" />
 		</xs:sequence>
 	</xs:complexType>
-	</xs:element>
+</xs:element>
+<xs:complexType name="limit">
+	<xs:choice>
+		<xs:element name="percentageLimit">
+			<xs:complexType>
+				<xs:attribute name="limit" type="percentage" use="required"/>
+				<xs:attribute name="round" type="updowntype" default="up" />
+				<xs:anyAttribute/>
+			</xs:complexType>
+		</xs:element>
+		<xs:element name="sizeConstrainedLimit">
+			<xs:complexType>
+				<xs:attribute name="limit" type="xs:positiveInteger" use="required"/>
+				<xs:anyAttribute/>
+			</xs:complexType>
+		</xs:element>
+		<xs:element name="absoluteLimit">
+			<xs:complexType>
+				<xs:attribute name="limit" type="xs:positiveInteger" use="required"/>
+				<xs:anyAttribute/>
+			</xs:complexType>
+		</xs:element>
+		<xs:element name="unlimitedLimit">
+			<xs:complexType>
+				<xs:anyAttribute/>
+			</xs:complexType>
+		</xs:element>
+	</xs:choice>
+</xs:complexType>
 <xs:simpleType name="positiveOrInfiniteInteger">
 	<xs:union memberTypes="xs:positiveInteger infinity"/>
 </xs:simpleType>
@@ -40,4 +68,10 @@
 <xs:simpleType name="nonNegativeOrInfiniteIntegerOrPercentage">
 	<xs:union memberTypes="xs:nonNegativeInteger infinity percentage"/>
 </xs:simpleType>
+<xs:simpleType name="updowntype">
+	<xs:restriction base="xs:string">
+		<xs:enumeration value="up"/>
+		<xs:enumeration value="down"/>
+	</xs:restriction>
+</xs:simpleType>
 </xs:schema>
\ No newline at end of file