Mercurial > repos > IBDev-IBBoard.WarFoundry.API
changeset 271:da286069b9c6
Re #290: Migrate to using key/keyref definitions instead of ID/IDREF type
* Migrate unit containership to key/keyref
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 14 Jun 2010 19:56:10 +0000 |
parents | b1c4241b8a2e |
children | 166d01079acf |
files | schemas/race.xsd |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/schemas/race.xsd Mon Jun 14 19:42:53 2010 +0000 +++ b/schemas/race.xsd Mon Jun 14 19:56:10 2010 +0000 @@ -89,6 +89,14 @@ <xs:selector xpath="race:equipment/race:equipmentItem"/> <xs:field xpath="@id"/> </xs:key> + <xs:keyref name="containedUnitRef" refer="unitKey"> + <xs:selector xpath="race:units/race:unit/race:contains/race:containedUnit"/> + <xs:field xpath="@containedID"/> + </xs:keyref> + <xs:key name="unitKey"> + <xs:selector xpath="race:units/race:unit"/> + <xs:field xpath="@id"/> + </xs:key> </xs:element> <!--Reusable complex types --> @@ -179,7 +187,7 @@ <xs:sequence> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </xs:sequence> - <xs:attribute name="containedID" type="xs:IDREF" use="required"/> + <xs:attribute name="containedID" type="xs:string" use="required"/> <xs:anyAttribute processContents="lax"/> </xs:complexType> </xs:element> @@ -237,7 +245,7 @@ <xs:element name="notes" type="xs:string" minOccurs="0" /> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> </xs:sequence> - <xs:attribute name="id" type="xs:ID" /> + <xs:attribute name="id" type="xs:string" use="required" /> <xs:attribute name="typeName" type="xs:string" use="required"/> <xs:attribute name="cat" type="xs:string" use="required"/> <xs:attribute name="points" type="core:nonNegativeNonInfiniteDouble" use="required"/>