Page 2 of 2

Re: Design of property and piece XML for V4

PostPosted: September 14th, 2012, 6:47 pm
by alitur
Ainulindale wrote:I already built such a thing (xsd), check previous messages. Your
implementation is not strongly typed: property can be of both int and
string types, which doesn't seem simple to handle properly both in terms of
validation and in the engine.


That is true. The engine needs the information about the property type. Maybe those stringProperties are the way to go.
One more point about xml I missed on my first message: the id attribute value should be unique in the document. So no two elements with same id.

Re: Design of property and piece XML for V4

PostPosted: September 14th, 2012, 7:02 pm
by Ainulindale
On Fri, Sep 14, 2012 at 8:47 PM, alitur wrote:

> That is true. The engine needs the information about the property type.
> Maybe those stringProperties are the way to go.
> One more point about xml I missed on my first message: the id attribute
> value should be unique in the document. So no two elements with same id.
>
>
Indeed.
You should really check the XSD I did, it's in that spirit :-)

--
Julien Cassignol
http://www.ainulindale.net

Re: Design of property and piece XML for V4

PostPosted: September 18th, 2012, 3:38 am
by tar
Well, for datatypes one should perhaps look at XML Schema and the already
defined XSD types.
For example, see
http://www.w3schools.com/schema/schema_ ... umeric.asp

and the specs
http://www.w3.org/TR/2004/REC-xmlschema ... tures.html
http://www.w3.org/TR/xmlschema-2/ (<
http://www.w3.org/TR/xmlschema-2/#built-in-datatypes>)

Re: Design of property and piece XML for V4

PostPosted: September 18th, 2012, 7:05 am
by Ainulindale
Tom,

On Tue, Sep 18, 2012 at 5:38 AM, Tom Russ wrote:

> Well, for datatypes one should perhaps look at XML Schema and the already
> defined XSD types.
> For example, see
> http://www.w3schools.com/schema/schema_ ... umeric.asp
>

We looked and used it.
As a reminder, check out
http://www.ainulindale.net/vassal/vassalengine.xsdwhich is what I did
based on our discussions with Uckelman, and which we
reviewed together.
This is only a basis for discussion, but it gives you an idea of what we
can do with XSD as well as in terms of grammar.

--
Julien Cassignol
http://www.ainulindale.net

Re: Design of property and piece XML for V4

PostPosted: September 18th, 2012, 6:29 pm
by tar
Excellent.

(I should have looked at the DTD rather than just what was posted in this
thread.)

On Tue, Sep 18, 2012 at 12:05 AM, Julien Cassignol wrote:

> Tom,
>
> On Tue, Sep 18, 2012 at 5:38 AM, Tom Russ wrote:
>
>> Well, for datatypes one should perhaps look at XML Schema and the already
>> defined XSD types.
>> For example, see
>> http://www.w3schools.com/schema/schema_ ... umeric.asp
>>
>
> We looked and used it.
> As a reminder, check out
> http://www.ainulindale.net/vassal/vassalengine.xsd which is what I did
> based on our discussions with Uckelman, and which we reviewed together.
> This is only a basis for discussion, but it gives you an idea of what we
> can do with XSD as well as in terms of grammar.
>
> --
> Julien Cassignol
> http://www.ainulindale.net
>
> _______________________________________________
> messages mailing list
> messages@vassalengine.org
> http://www.vassalengine.org/mailman/listinfo/messages
>
>