Mercurial > repos > IBBoard.WarFoundry.API
diff dtds/warfoundry-core.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 |
line wrap: on
line diff
--- a/dtds/warfoundry-core.xsd Thu Mar 19 20:12:29 2009 +0000 +++ b/dtds/warfoundry-core.xsd Sat Mar 21 17:04:33 2009 +0000 @@ -1,17 +1,24 @@ <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/core" xmlns="http://ibboard.co.uk/warfoundry/core" elementFormDefault="qualified"> -<xs:simpleType name="infiniteOrNonNegativeDouble"> +<xs:simpleType name="positiveOrInfiniteInteger"> + <xs:union memberTypes="xs:positiveInteger infinity"/> +</xs:simpleType> +<xs:simpleType name="nonNegativeOrInfiniteInteger"> + <xs:union memberTypes="xs:nonNegativeInteger infinity"/> +</xs:simpleType> +<xs:simpleType name="infinity"> + <xs:restriction base="xs:integer"> + <xs:minInclusive value="-1"/> + <xs:maxInclusive value="-1"/> + </xs:restriction> +</xs:simpleType> +<xs:simpleType name="nonNegativeDouble"> <xs:restriction base="xs:double"> <xs:minInclusive value="0"/> </xs:restriction> </xs:simpleType> -<xs:simpleType name="infiniteOrNonNegativeInteger"> - <xs:restriction base="xs:integer"> - <xs:minInclusive value="0"/> - </xs:restriction> -</xs:simpleType> -<xs:simpleType name="nonNegativeDouble"> +<xs:simpleType name="nonNegativeNonInfiniteDouble"> <xs:restriction base="xs:double"> <xs:minInclusive value="0"/> <xs:maxExclusive value="INF"/>