Why learn WML?
Moderator: Forum Moderators
Re: Why learn WML?
The main difference would be the bracket-type: angled rather than square.
Re: Why learn WML?
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).AI wrote:The main difference would be the bracket-type: angled rather than square.
All the rest are details.
Re: Why learn WML?
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
Re: Why learn WML?
OK, I forgot this.Dave wrote:Errr the main difference would be that XML doesn't support gettext internationalization while WML does.
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).
Re: Why learn WML?
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!
http://www.wesnoth.org/wiki/WesCamp
Translators for all languages required: contact me. No geek skills required!
Re: Why learn WML?
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.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.
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.
WML as XML
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 :
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...
- 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.
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...
Re: Why learn WML?
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.
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
UMC Maintainer: Forward They Cried, A Few Logs, A Few More Logs, Start of the War, and Battle Against Time