[messages] [Developers] Design of property and piece XML for V4

uckelman uckelman at nomic.net
Fri Sep 14 03:11:14 MST 2012


"alitur" wrote:
> 
> "uckelman" wrote:
> > 
> > > Now the properties of the piece could be found under the
> > properties tag.
> > > Property name would be the element name. The validation that
> > > movement_allowance should be int could be defined in
> > > battleformoscow.xsd. But is this only leading us to the next step?
> > 
> > This prefents us from having a common schema for all modules.
> > Creating
> > a correct schema isn't easy, and having that will save us endless
> > trouble from bad input. An incorrect schema means that we can't
> > trust
> > the integrity of the input we get. Few module designers will have
> > ever
> > heard of schmata, let alone be able to create ones which have no
> > holes.
> > 
> 
> 
> Actually the common schema (vassal.xsd) would be common for all
> modules. It only says that piece has to have some properties. That is
> common for all the modules. The "extra" schema would be just for the
> game specific properties.
> 

The extra schema is precisely what I'm objecting to. If it's
user-supplied, then we no longer have any assurance that it we're
getting valid data.


> 
> Also, are these files really written by hand?
> 

Some will be. And we will definitely spend some time examining them to
find module bugs, written by hand or not.


> One can also write an xslt that can do the transformation between
> those two formats.

I can. But I don't expect that the average module designer can, nor to I
expect that the average module designer can write a correct schema. (I
don't expect that we're going to devise an editor which generates
schemata, either.) If we're setting up a system where the hard things
have to be done for each module by nonexperts rather than once by
experts, then we're setting up a system which is doomed to fail.

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=36044#p36044


More information about the messages mailing list