diff api/Factories/Xml/WarFoundryXmlLimitParser.cs @ 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 d8e4eeb761c7
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;
 		}
 	}
 }