Create account / Log in

Design of property and piece XML for V4

Discussion area for the development team.

Moderators: uckelman, Tim M

Re: Design of property and piece XML for V4

Postby alitur » September 14th, 2012, 6:47 pm

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.
alitur
 
Posts: 7
Joined: July 30th, 2012, 8:50 pm

Re: Design of property and piece XML for V4

Postby Ainulindale » September 14th, 2012, 7:02 pm

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
Ainulindale
 
Posts: 29
Joined: July 12th, 2012, 8:17 pm

Re: Design of property and piece XML for V4

Postby tar » September 18th, 2012, 3:38 am

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>)
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Re: Design of property and piece XML for V4

Postby Ainulindale » September 18th, 2012, 7:05 am

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
Ainulindale
 
Posts: 29
Joined: July 12th, 2012, 8:17 pm

Re: Design of property and piece XML for V4

Postby tar » September 18th, 2012, 6:29 pm

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
>
>
User avatar
tar
 
Posts: 776
Joined: January 2nd, 2008, 6:53 pm
Location: Los Angeles area

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 5 guests