Mercurial > repos > snowblizz-super-API-ideas
changeset 159:7b98e71b8511
Re #152: Test and fix extensibility of current schemas
* Add "any" elements and "anyAttributes" to schemas where appropriate
Still need to handle cleansing with XSLT
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 30 Sep 2009 19:08:08 +0000 |
parents | eb9a6d91a6db |
children | 41b927998a41 |
files | dtds/army.xsd dtds/race.xsd dtds/system.xsd dtds/warfoundry-cats.xsd |
diffstat | 4 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dtds/army.xsd Tue Sep 29 19:50:46 2009 +0000 +++ b/dtds/army.xsd Wed Sep 30 19:08:08 2009 +0000 @@ -14,10 +14,14 @@ <xs:sequence> <xs:element name="equipItem" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> + <xs:sequence> + <xs:any minOccurs="0" /> + </xs:sequence> <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="core:nonNegativeOrInfiniteIntegerOrPercentage" use="required"/><!-- Double used to allow for percentages to be stored --> <xs:attribute name="amountType" type="equipmentAmountType" default="ratio"/> <xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> @@ -28,18 +32,24 @@ <xs:sequence> <xs:element name="containedUnit"> <xs:complexType> + <xs:sequence> + <xs:any minOccurs="0" /> + </xs:sequence> <xs:attribute name="containedID" type="xs:IDREF" use="required"/> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> + <xs:any minOccurs="0" /> </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:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> @@ -53,22 +63,29 @@ <xs:sequence> <xs:element name="customEquipPart" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> + <xs:sequence> + <xs:any minOccurs="0" /> + </xs:sequence> <xs:attribute name="partIDRef" type="xs:string" /> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:ID" /> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> + <xs:any minOccurs="0" /> </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:anyAttribute/> </xs:complexType> </xs:element> <xs:simpleType name="equipmentAmountType">
--- a/dtds/race.xsd Tue Sep 29 19:50:46 2009 +0000 +++ b/dtds/race.xsd Wed Sep 30 19:08:08 2009 +0000 @@ -114,6 +114,7 @@ </xs:complexType> </xs:element> <xs:element name="notes" type="xs:string" minOccurs="0" /> + <xs:any minOccurs="0" /> </xs:all> <xs:attribute name="id" type="xs:ID" /> <xs:attribute name="typeName" type="xs:string" use="required"/> @@ -139,6 +140,7 @@ <xs:complexType> <xs:all> <xs:element name="description" type="xs:string" minOccurs="0" /> + <xs:any minOccurs="0" /> </xs:all> <xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> @@ -158,6 +160,7 @@ <xs:complexType> <xs:all> <xs:element name="description" type="xs:string" /> + <xs:any minOccurs="0" /> </xs:all> <xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/> @@ -168,6 +171,7 @@ <xs:anyAttribute/> </xs:complexType> </xs:element> + <xs:any minOccurs="0" /> </xs:all> <xs:attribute name="id" type="xs:ID" /> <xs:attribute name="subid" type="xs:string" default=""/>
--- a/dtds/system.xsd Tue Sep 29 19:50:46 2009 +0000 +++ b/dtds/system.xsd Wed Sep 30 19:08:08 2009 +0000 @@ -14,21 +14,26 @@ <xs:element name="sysStat" minOccurs="1" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:ID" /> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="defaultStats" type="xs:IDREF" /> + <xs:anyAttribute/> </xs:complexType> </xs:element> + <xs:any minOccurs="0" /> </xs:all> <xs:attribute name="id" type="xs:ID" /> <xs:attribute name="name" type="xs:string" use="required"/> <xs:attribute name="warn" type="xs:boolean" default="false"/> <xs:attribute name="allowAllies" type="xs:boolean" default="true"/> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:schema> \ No newline at end of file
--- a/dtds/warfoundry-cats.xsd Tue Sep 29 19:50:46 2009 +0000 +++ b/dtds/warfoundry-cats.xsd Wed Sep 30 19:08:08 2009 +0000 @@ -11,8 +11,10 @@ <xs:attribute name="maxPoints" type="core:nonNegativeOrInfiniteInteger" default="-1"/> <xs:attribute name="minPercentage" type="core:percentage" default="0"/> <xs:attribute name="maxPercentage" type="core:percentage" default="100"/> + <xs:anyAttribute/> </xs:complexType> </xs:element> </xs:sequence> + <xs:anyAttribute/> </xs:complexType> </xs:schema> \ No newline at end of file