Mercurial > repos > snowblizz-super-API-ideas
changeset 249:2f8fd45d55e2
Fixes #152: Test and fix extensibility of current schemas
* Complete forward and backward compatibility of schemas (according to testing)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 13 Mar 2010 20:51:04 +0000 |
parents | 6abf70f31ae4 |
children | b8b6a1c50023 |
files | schemas/army.xsd schemas/race.xsd schemas/system.xsd |
diffstat | 3 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/schemas/army.xsd Sat Mar 13 16:46:42 2010 +0000 +++ b/schemas/army.xsd Sat Mar 13 20:51:04 2010 +0000 @@ -2,12 +2,13 @@ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ibboard.co.uk/warfoundry/army" xmlns="http://ibboard.co.uk/warfoundry/army" xmlns:core="http://ibboard.co.uk/warfoundry/core" elementFormDefault="qualified"> <xs:element name="army"> <xs:complexType> - <xs:all> + <xs:sequence> <xs:element name="units"> <xs:complexType> <xs:sequence> <xs:element name="unit" minOccurs="0" maxOccurs="unbounded" type="unit"/> </xs:sequence> + <xs:anyAttribute processContents="lax"/> </xs:complexType> </xs:element> <xs:element name="customEquipment" minOccurs="0"> @@ -32,10 +33,11 @@ </xs:complexType> </xs:element> </xs:sequence> + <xs:anyAttribute processContents="lax"/> </xs:complexType> </xs:element> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> - </xs:all> + </xs:sequence> <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"/> @@ -48,7 +50,7 @@ <!-- Re-usable complex types --> <xs:complexType name="unit"> - <xs:all> + <xs:sequence> <xs:element name="equipment" minOccurs="0"> <xs:complexType> <xs:sequence> @@ -57,7 +59,7 @@ <xs:sequence> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </xs:sequence> - <xs:attribute name="id" type="xs:string" /> + <xs:attribute name="id" type="xs:string" use="required" /> <xs:attribute name="amount" type="core:nonNegativeOrInfiniteIntegerOrPercentage" use="required"/> <xs:attribute name="amountType" type="equipmentAmountType" default="ratio"/> <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/> @@ -65,6 +67,7 @@ </xs:complexType> </xs:element> </xs:sequence> + <xs:anyAttribute processContents="lax"/> </xs:complexType> </xs:element> <xs:element name="contains" minOccurs="0"> @@ -83,7 +86,7 @@ </xs:complexType> </xs:element> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> - </xs:all> + </xs:sequence> <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"/>
--- a/schemas/race.xsd Sat Mar 13 16:46:42 2010 +0000 +++ b/schemas/race.xsd Sat Mar 13 20:51:04 2010 +0000 @@ -102,7 +102,7 @@ <xs:element name="unitAbility" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> - <xs:any minOccurs="0" processContents="lax"/> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </xs:sequence> <xs:attribute name="abilityID" type="xs:IDREF" /> <xs:attribute name="required" type="xs:boolean" default="true"/> @@ -136,7 +136,7 @@ <xs:element name="containedUnit" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> - <xs:any minOccurs="0" processContents="lax"/> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </xs:sequence> <xs:attribute name="containedID" type="xs:IDREF" use="required"/> <xs:anyAttribute processContents="lax"/>
--- a/schemas/system.xsd Sat Mar 13 16:46:42 2010 +0000 +++ b/schemas/system.xsd Sat Mar 13 20:51:04 2010 +0000 @@ -13,6 +13,9 @@ <xs:sequence> <xs:element name="sysStat" maxOccurs="unbounded"> <xs:complexType> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> <xs:anyAttribute processContents="lax"/> </xs:complexType>