# HG changeset patch # User IBBoard # Date 1237063096 0 # Node ID 457c9357dd645f30cb6d4de1358cfaad5c227c28 # Parent 92cf25b0493b88d3355bb4ae90474c4d5037475c Re #32 - Convert to schemas * Remove node count check from factory - Schema should validate document properly * Update race schema: * Add min and maxOccurs attributes * change "points" to "cost" * change equipID to ID * temporarily replace core:nonNegativeDecimal with xs:integer so that we don't get stuck on validation errors about casting to string diff -r 92cf25b0493b -r 457c9357dd64 api/Factories/Xml/WarFoundryXmlFactory.cs --- a/api/Factories/Xml/WarFoundryXmlFactory.cs Sat Mar 14 20:16:09 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlFactory.cs Sat Mar 14 20:38:16 2009 +0000 @@ -277,11 +277,6 @@ finally { reader.Close(); - } - - if (doc.ChildNodes.Count!=3) - { - throw new InvalidFileException(Translation.GetTranslation("ErrorInvalidXmlFile", "XML file was not a valid XML file. It should contain three child nodes - XML definition, DocType and root node.")); } return doc; diff -r 92cf25b0493b -r 457c9357dd64 dtds/race.xsd --- a/dtds/race.xsd Sat Mar 14 20:16:09 2009 +0000 +++ b/dtds/race.xsd Sat Mar 14 20:38:16 2009 +0000 @@ -5,9 +5,9 @@ - - - + + + @@ -24,11 +24,11 @@ - - - - - + + + + + @@ -36,9 +36,9 @@ - + - + @@ -59,11 +59,11 @@ - + - - + + @@ -117,16 +117,16 @@ - + - + - +