XML: content bundled with presentation?
March 31, 2009
There is a growing interest in Domain Specific Languages (DSL), and feeling that this technology would eventually render XML obsolete. Consider the following example of “2+2=4″ written in XML:

Aside from being insulting to reader’s intelligence, can you spot what is wrong with it? Where do these tree node annotations are coming from? Consider a grammar for expression parser:
constraint : expression ‘<‘ expression
| expression ‘=‘ expression
…
expression : expression ‘+’ expression
| number
…
In formal languages and parser theory world we have clear separation of the data (that is “2+2=4″), on one hand, and the schema describing the structure of the data (that is the expression grammar), on the other. In XML world the data and the schema are bundled together into some caricature of the parse tree. Yes, skipping parsing as the hard part of the job is somewhat handy, but what happened to the famous programming principle “Separate content from presentation”?
April 2, 2009 at 6:23 am
use XSD or it’s older cousin DTD ?
June 9, 2009 at 12:17 pm
Once again i’m happy to read an article that shows how pointless this whole hype is.
As if there weren’t enough languages to choose from… just provide a few basic functions/classes/methods/whatever and document how to use them in the affected domain.
Whatever, it’s waste of energy to comment on this nonsense… i just couldn’t resist to agree.
Now back to actually interesting things… which is the reason i came to this fine blog