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 diff
     1.1 --- a/dtds/army.xsd	Tue Sep 29 19:50:46 2009 +0000
     1.2 +++ b/dtds/army.xsd	Wed Sep 30 19:08:08 2009 +0000
     1.3 @@ -14,10 +14,14 @@
     1.4  											<xs:sequence>
     1.5  												<xs:element name="equipItem" minOccurs="1" maxOccurs="unbounded">
     1.6  													<xs:complexType>
     1.7 +														<xs:sequence>
     1.8 +															<xs:any minOccurs="0" />
     1.9 +														</xs:sequence>
    1.10  														<xs:attribute name="id" type="xs:string" /> <!-- ID reference to either a custom equipment item or a Race equipment item -->
    1.11  														<xs:attribute name="amount" type="core:nonNegativeOrInfiniteIntegerOrPercentage" use="required"/><!-- Double used to allow for percentages to be stored -->
    1.12  														<xs:attribute name="amountType" type="equipmentAmountType" default="ratio"/>
    1.13  														<xs:attribute name="isCustomEquipment" type="xs:boolean" default="false"/>
    1.14 +														<xs:anyAttribute/>
    1.15  													</xs:complexType>
    1.16  												</xs:element>
    1.17  											</xs:sequence>
    1.18 @@ -28,18 +32,24 @@
    1.19  											<xs:sequence>
    1.20  												<xs:element name="containedUnit">
    1.21  													<xs:complexType>
    1.22 +														<xs:sequence>
    1.23 +															<xs:any minOccurs="0" />
    1.24 +														</xs:sequence>
    1.25  														<xs:attribute name="containedID" type="xs:IDREF" use="required"/>
    1.26 +														<xs:anyAttribute/>
    1.27  													</xs:complexType>
    1.28  												</xs:element>
    1.29  											</xs:sequence>
    1.30  										</xs:complexType>
    1.31  									</xs:element>
    1.32 +									<xs:any minOccurs="0" />
    1.33  								</xs:all>
    1.34  								<xs:attribute name="id" type="xs:ID" />
    1.35  								<xs:attribute name="unitType" type="xs:string" use="required"/>
    1.36  								<xs:attribute name="unitName" type="xs:string" use="required"/>
    1.37  								<xs:attribute name="size" type="xs:positiveInteger" use="required"/>
    1.38  								<xs:attribute name="race" type="xs:string" default=""/>
    1.39 +								<xs:anyAttribute/>
    1.40  							</xs:complexType>
    1.41  						</xs:element>
    1.42  					</xs:sequence>
    1.43 @@ -53,22 +63,29 @@
    1.44  								<xs:sequence>
    1.45  									<xs:element name="customEquipPart" minOccurs="1" maxOccurs="unbounded">
    1.46  										<xs:complexType>
    1.47 +											<xs:sequence>
    1.48 +												<xs:any minOccurs="0" />
    1.49 +											</xs:sequence>
    1.50  											<xs:attribute name="partIDRef" type="xs:string" />
    1.51 +											<xs:anyAttribute/>
    1.52  										</xs:complexType>
    1.53  									</xs:element>
    1.54  								</xs:sequence>
    1.55  								<xs:attribute name="id" type="xs:ID" />
    1.56 +								<xs:anyAttribute/>
    1.57  							</xs:complexType>
    1.58  						</xs:element>
    1.59  					</xs:sequence>
    1.60  				</xs:complexType>
    1.61  			</xs:element>
    1.62 +			<xs:any minOccurs="0" />
    1.63  		</xs:all>
    1.64  		<xs:attribute name="id" type="xs:ID" />
    1.65  		<xs:attribute name="name" type="xs:string" use="required"/>
    1.66  		<xs:attribute name="system" type="xs:string" use="required"/>
    1.67  		<xs:attribute name="race" type="xs:string" use="required"/>
    1.68  		<xs:attribute name="maxPoints" type="xs:positiveInteger" use="required"/>
    1.69 +		<xs:anyAttribute/>
    1.70  	</xs:complexType>
    1.71  </xs:element>
    1.72  <xs:simpleType name="equipmentAmountType">
     2.1 --- a/dtds/race.xsd	Tue Sep 29 19:50:46 2009 +0000
     2.2 +++ b/dtds/race.xsd	Wed Sep 30 19:08:08 2009 +0000
     2.3 @@ -114,6 +114,7 @@
     2.4  										</xs:complexType>
     2.5  									</xs:element>
     2.6  									<xs:element name="notes" type="xs:string" minOccurs="0" />
     2.7 +									<xs:any minOccurs="0" />
     2.8  								</xs:all>
     2.9  								<xs:attribute name="id" type="xs:ID" />
    2.10  								<xs:attribute name="typeName" type="xs:string" use="required"/>
    2.11 @@ -139,6 +140,7 @@
    2.12  							<xs:complexType>
    2.13  								<xs:all>
    2.14  									<xs:element name="description" type="xs:string" minOccurs="0" />
    2.15 +									<xs:any minOccurs="0" />
    2.16  								</xs:all>
    2.17  								<xs:attribute name="id" type="xs:ID" use="required"/>
    2.18  								<xs:attribute name="name" type="xs:string" use="required"/>
    2.19 @@ -158,6 +160,7 @@
    2.20  							<xs:complexType>
    2.21  								<xs:all>
    2.22  									<xs:element name="description" type="xs:string" />
    2.23 +									<xs:any minOccurs="0" />
    2.24  								</xs:all>
    2.25  								<xs:attribute name="id" type="xs:ID" use="required"/>
    2.26  								<xs:attribute name="name" type="xs:string" use="required"/>
    2.27 @@ -168,6 +171,7 @@
    2.28  					<xs:anyAttribute/>
    2.29  				</xs:complexType>
    2.30  			</xs:element>
    2.31 +			<xs:any minOccurs="0" />
    2.32  		</xs:all>
    2.33  		<xs:attribute name="id" type="xs:ID" />
    2.34  		<xs:attribute name="subid" type="xs:string" default=""/>
     3.1 --- a/dtds/system.xsd	Tue Sep 29 19:50:46 2009 +0000
     3.2 +++ b/dtds/system.xsd	Wed Sep 30 19:08:08 2009 +0000
     3.3 @@ -14,21 +14,26 @@
     3.4  									<xs:element name="sysStat" minOccurs="1" maxOccurs="unbounded">
     3.5  										<xs:complexType>
     3.6  											<xs:attribute name="name" type="xs:string" use="required"/>
     3.7 +											<xs:anyAttribute/>
     3.8  										</xs:complexType>
     3.9  									</xs:element>
    3.10  								</xs:sequence>
    3.11  								<xs:attribute name="id" type="xs:ID" />
    3.12 +								<xs:anyAttribute/>
    3.13  							</xs:complexType>
    3.14  						</xs:element>
    3.15  					</xs:sequence>
    3.16  					<xs:attribute name="defaultStats" type="xs:IDREF" />
    3.17 +					<xs:anyAttribute/>
    3.18  				</xs:complexType>
    3.19  			</xs:element>
    3.20 +			<xs:any minOccurs="0" />
    3.21  		</xs:all>
    3.22  		<xs:attribute name="id" type="xs:ID" />
    3.23  		<xs:attribute name="name" type="xs:string" use="required"/>
    3.24  		<xs:attribute name="warn" type="xs:boolean" default="false"/>
    3.25  		<xs:attribute name="allowAllies" type="xs:boolean" default="true"/>
    3.26 +		<xs:anyAttribute/>
    3.27  	</xs:complexType>
    3.28  </xs:element>
    3.29  </xs:schema>
    3.30 \ No newline at end of file
     4.1 --- a/dtds/warfoundry-cats.xsd	Tue Sep 29 19:50:46 2009 +0000
     4.2 +++ b/dtds/warfoundry-cats.xsd	Wed Sep 30 19:08:08 2009 +0000
     4.3 @@ -11,8 +11,10 @@
     4.4  				<xs:attribute name="maxPoints" type="core:nonNegativeOrInfiniteInteger" default="-1"/>
     4.5  				<xs:attribute name="minPercentage" type="core:percentage" default="0"/>
     4.6  				<xs:attribute name="maxPercentage" type="core:percentage" default="100"/>
     4.7 +				<xs:anyAttribute/>
     4.8  			</xs:complexType>
     4.9  		</xs:element>
    4.10  	</xs:sequence>
    4.11 +	<xs:anyAttribute/>
    4.12  </xs:complexType>
    4.13  </xs:schema>
    4.14 \ No newline at end of file