XSLT funk

TorgoX on 2006-03-19T18:56:19

Dear Log,

Man oh man, XSLT is a mess of a language.

  • It started out in a totally muddled Chang/Eng relationship with XSLFO (which, to my mind, bears no more of an essential relationship to XSLT than Perl does to RTF).
  • Its first big implementation was by Microsoft, which was of course a complete wreck.
  • Design-wise, XSLT seems to have painted itself into so many corners that it may thus have inadvertently proven that spacetime really does have eleven dimensions.
  • It is blessed/cursed by numerous vendor-specific extensions.
  • It is caught between incredible tidal forces that on the one hand want to "keep it simple" (so, variable use is crazily limited, almost stifled; there's no proper looping constructs in the core language) and on the other hand want it to be useful (templates/functions can be recursive!).
  • It may actually be the most visually unpleasant and verbose language ever.
  • Its rule-based system is really hard to be completely comfortable with.
  • There's no particularly good answer to the question "why use XSLT instead of Perl (or any other language)?", other than that it's built into Firefox and MSIE (although so is JavaScript).
  • I imagine that many applications embed it instead of JavaScript or Lisp, for the reason that "well, XSL is not a whole language like those others are"-- an argument whose speciousness tarnishes everything it touches.

And yet, XSL is just barely useful enough that it won't go away any time soon. And like MSDOS .bat language, it's not awful at big dumb rudimntary tasks.

And it's in that very odd class of things where you have to admit "if we had it to design over again, it wouldn't look anything like it does now; but since we're already this far into it, I guess we might as well stick with it, ah well".

And on the one hand, XSL replaced something (DSSSL) that was a thousand times more bizarre; but on the other, it's impossible to look at XSL and have the word "progress" come to mind. Folks, the 8KB ROM BASICs from thirty years ago were better than this.

And yet, and yet... And yet, here it is, a testament to our inability to agree on anything better.

XSL always reminds me of that quote of Hunter S. Thompson's: "There he goes. One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die."