Why learn WML?

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

AI
Inactive Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Why learn WML?

Post by AI »

The main difference would be the bracket-type: angled rather than square.
User avatar
pauxlo
Posts: 1049
Joined: September 19th, 2006, 8:54 pm

Re: Why learn WML?

Post by pauxlo »

AI wrote:The main difference would be the bracket-type: angled rather than square.
The second main difference is that in XML the attributes (name-value-pairs) are inside of the start tags, while they in WML are between start and end tags (where XML can have text content).

All the rest are details.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: Why learn WML?

Post by Dave »

Errr the main difference would be that XML doesn't support gettext internationalization while WML does. Everything besides that is a detail. :)
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
pauxlo
Posts: 1049
Joined: September 19th, 2006, 8:54 pm

Re: Why learn WML?

Post by pauxlo »

Dave wrote:Errr the main difference would be that XML doesn't support gettext internationalization while WML does.
OK, I forgot this.
This could be build in in the parser (simply translate all attributes which start with "_", or so), or in the engine which interprets them - maybe even automatically knowing which of the attributes are to translate.
Or translation could work similar as variables work now.
So, I don't see this as a nessesary language feature (on the basic syntax level).
torangan
Retired Developer
Posts: 1365
Joined: March 27th, 2004, 12:25 am
Location: Germany

Re: Why learn WML?

Post by torangan »

This is quite useless... Do a port over to XML or whatever you want and show that it's easier to use or faster or whater. Theoretical ideas are nice but unless someone implements them you won't know wheter they'll work out for real. The good part about that would be that you'd have to rewrite quite a bit of old code which could probably use it.
WesCamp-i18n - Translations for User Campaigns:
http://www.wesnoth.org/wiki/WesCamp

Translators for all languages required: contact me. No geek skills required!
User avatar
pauxlo
Posts: 1049
Joined: September 19th, 2006, 8:54 pm

Re: Why learn WML?

Post by pauxlo »

torangan wrote:This is quite useless... Do a port over to XML or whatever you want and show that it's easier to use or faster or whater. Theoretical ideas are nice but unless someone implements them you won't know wheter they'll work out for real.
If this was directed to me ... sorry, it seems my intentions were not quite clear. I don't propose a change from WML to any XML-based language, this was just a bit of teoretical talking about the differences.
I'm quite satisfied with WML as it is, at least the language basics. (There are some (minor) problems at the API level, but this is worked on, and wouldn't be better with XML, or any other markup language.) And since I can't invest really time here (at least in this year), I'll shut up now.
tomdesp
Posts: 4
Joined: May 8th, 2007, 3:13 pm

WML as XML

Post by tomdesp »

As I was pointing out in another post (rapidly locked !), the implementation of WML with XML would make its use much simpler. Not because XML is better than WML, only because XML comes with tons of wonderful tools :
  • XML is supported by many wonderful open source editors, with many features : syntax colouring, contextual auto-completions (life-changer!), graphical modeler
  • XML supports file inclusions, enabling structured projects : is there a way to do that with WML by now ?
  • XML parsers are legions, most of them totally bugfree as far as standard parsing is concerned and really fast : that'd help Wesnoth engine development. To add a point to a former post in this thread, I seriously doubt one could build from scratch a better hierarchical markup parser than the existing XML parser available in every language on earth.
  • Syntax validation, using a schemas would be harmless, and would be the "contract" between WML writers, and WML : by the way, it'd make the WML Validation schemes Summer of Code totally trivial, using XML Schemas Definition.
  • XML Transformations would make WML localisation quite trivial to implement, yet it wouldn't be gettext based.
I've read many wrong or abusive assertions over what XML is or not in this thread. If you wish to learn more you should go to http://w3schools.com/xml/.

To be clear, from my perspective, implementing WML with XML would be much better for many reasons, but it won't prevent you from learning the data structure, I would just provide tools to users (and developpers).

Anyway, WML is not that far away...
User avatar
Turuk
Sithslayer
Posts: 5283
Joined: February 28th, 2007, 8:58 pm
Contact:

Re: Why learn WML?

Post by Turuk »

Finding another thread to restate your point that has been previously locked is the same as making a meta-thread.... Particularly when the thread in question is over a year old and you were given a quote from it as a reason that the discussion did not need to happen again.

Leave it alone.
torangan wrote:This is quite useless... Do a port over to XML or whatever you want and show that it's easier to use or faster or whater. Theoretical ideas are nice but unless someone implements them you won't know wheter they'll work out for real. The good part about that would be that you'd have to rewrite quite a bit of old code which could probably use it.
Mainline Maintainer: AOI, DM, NR, TB and THoT.
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time
Locked