Mercurial > repos > IBDev-IBBoard.WarFoundry.API
changeset 266:a3c1bf57fd3f
Re #279: Create composite limit
* Ignore XPath and go for all child nodes, since we want to warn in future if an unsupported limit is ignored
* Make the "any" option in the limit choice group a singular instead of 0+ to ensure we get a choice when we use the group
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 05 Jun 2010 18:57:46 +0000 |
parents | 6fe0cb1bf74f |
children | 3f14a792fd41 |
files | api/Factories/Xml/WarFoundryXmlLimitParser.cs schemas/warfoundry-core.xsd |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlLimitParser.cs Sat Jun 05 15:36:04 2010 +0000 +++ b/api/Factories/Xml/WarFoundryXmlLimitParser.cs Sat Jun 05 18:57:46 2010 +0000 @@ -50,7 +50,7 @@ break; case "compositeMinLimit": ICollection<ILimit> minSubLimits = GetSubLimits(limitElem); - limit = new CompositeMaximumLimit(minSubLimits); + limit = new CompositeMinimumLimit(minSubLimits); break; default: //TODO: Warn of missing handler for when we've extended the limit list @@ -86,8 +86,7 @@ private XmlNodeList GetSubLimitElements(XmlElement limitElem) { - //"core:percentageLimit | core:sizeConstrainedLimit | core:absoluteLimit | core:unitSizeLimit | core:compositeMaxLimit | core:compositeMinLimit" - return WarFoundryXmlFactoryUtils.SelectNodes(limitElem, "core:absolueLimit"); + return limitElem.ChildNodes; } } }
--- a/schemas/warfoundry-core.xsd Sat Jun 05 15:36:04 2010 +0000 +++ b/schemas/warfoundry-core.xsd Sat Jun 05 18:57:46 2010 +0000 @@ -71,7 +71,7 @@ <xs:anyAttribute processContents="lax"/> </xs:complexType> </xs:element> - <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + <xs:any processContents="lax"/> </xs:choice> </xs:group> <xs:simpleType name="positiveOrInfiniteInteger">