by zdw · 16y ago · 0 comments
Know of any other data formats that allow schemas, validation, and transformation/styling of their content to other formats in a mature implementation independent manner?
If you're just moving bits around, use whatever.
If you're trying to create data interchange standards, XML is a pretty good choice.
* Few who were coming up with a format/DTD/schema understood the differentiation between placing value data in attribute values vs. element values.
* Element values would sometimes contain whitespace prefix and suffix due to formatting which caused problems with those values in the beginning.
* The optional XML declaration attribute didn't even fit in with the rest of the spirit of the format.
* The wealth of greater-than, less-than, slashes and quotes in the data was unnecessary, and converting from text to compressed format and back barely ever took off.
* The format allowed having one element partially within the scope of another <like><this></like></this> unlike bracket scope notation that would never have had such ambiguitity.
I could go on and on.
Transformation? Michael Kay may have been the man with the bible in the early 2000s, but I think everyone realized by the mid 2000s that XSLT and related XML transformations were a huge seemingly bottomless pit of wasted effort. What is needed was code, and people keep trying to make XSLT handle logic. Think of what those same people could have written in the same time using Java, Ruby, Python, PhP, Javascript. It is mind-boggling the amount of waste that XML and related formats have caused.
Moving bits around? Bits are moving around no matter what format you use. Why not use something that saves typing, and doesn't waste everyone's time?
All that said. XML is out there. I still do SOAP, WSDL, etc. I still mess with SAX and DOM in Java. I write XML services in Ruby and consume them. It is inescapable.
JSON doesn't yet cover all of the bases, but at least it is on a better track. Once people really think about the problems with XML- only then can we really evolve in the way we write and use unformatted human-readable data documents.
I wish the designers of JavaScript had been less keen on reinventing things. Yet another format we all have to support. Sigh.
I'd go nuts too if I had to enter all the tags by hand, if my left index/ring fingers didn't fall off first.