Design of property and piece XML for V4

I actually managed to write an vassal.xsd file that demands the property tags to be for example integer type or string types (see attachment). So now the module writer cannot write the game.xsd wrong (and thus game.xml) and Vassal engine always knows that it will be getting string or integers from the properties tag. So, even though the module builder provides the schema, it still has to obey vassal.xsd.

By writing the game files with schema in mind the file validates itself. I think xsd does not support for example validating following tag:

<intProperty name="movement_allowance" minValue="0">-5</intProperty>

That line will break in the Vassal xml parser or even deeper (-5 < 0). If there would be schema behind properties, their validation would happen in the xml editor.

My point here was that by providing the xslt (which does not have to be game specific, just common) vassal could provide and take in “human-friendly” xml and also “machine-friendly” xml+xsd. Although, don’t know if this just messes things up more.