Martin Fowler hates XSLT too

Google has code here that is inline with what I just said in the previous post.

http://goog-ajaxslt.sourceforge.net/

I learned HTML by reading the official documentation from W3C. Of course understanding XPath was a prerequisite, so I read XPath first. The documentation was at the right level of complexity and I’d say for the most part well written.

I later had to use my knowledge and I could see how colleagues disliked it because they had trouble wrapping their minds around various simple tasks. I had no trouble approaching these tasks, mainly because I read the documentation. (Most of their issues stemmed from misunderstanding on how an XPath selector’s result is acted upon template invocation; pure mechanics.)

XSLT does well what it’s meant to do, which is XML transformations. I didn’t really see the promise of panacea for data transformation anywhere, so is somebody here expecting too much of it?

I fear many technologies are well intended but they fail to live on because not all of us are technical and, let’s face it, users and usage are the ultimate judge of a technology’s destiny. Good is very, very relative, and while XSLT is good it may be that it hasn’t touched that cord to yield the good resonancy.

I’ve had similar reactions to other XML technologies that I pushed forward as an employee, like XML namespaces.

s/HTML/XSLT/

xslt is great. it has a small upfront cost to learn it, but it lets you build an incredible transformation layer. my only potential issue with it is speed.

It’d be great if the commenters could all come back and update their comments to say whether they’re talking about XSLT 1.0 or 2.0. They are two different languages: 1.0 can be a right PITA is you try to stray outside its narrow bounds; 2.0 is a lot better though, of course, still pretty verbose. It’s a pity 2.0 is not more widely implemented, particularly client-side.

As to the comment about getting XSLT through Michael Kay’s books: yes, I find they’re pretty much essential and have found the little else I’ve read has tended to be simplistic and misleading.

Jeff,

All the hard stuff should be done in c# extensions at the top of the XSLT file. We had a case where we were transforming XML in WordML and we wanted to generate a graph based on a node set in the XML. Obviously we weren’t going to generate the graph in XSLT. So, we passed the nodeset to a c# extension method which sent the nodeset to a ASPX page which consumed the XML, generated a graph using a 3rd party tool which then saved it as a JPEG. We streamed the JPEG back into the XSLT as base64 and there it was when you opened the Word file. Magical!

I hate XSLT too.

To me, XSLT is about as intuitive as doing brain surgery while drunk.

I much prefer HTML generation using PHP.

I read your blog, although I am a java-programmer, because of your insights into programming. You write well and if I get to know a bit of .net on the way, that’s fine by me. Your writing on RegExps for example, can easily be applied to Java as well.

That’s why I just find it below you to link to a four year old article bashing Java, it just seems silly to me. Don’t we have enough of mud-slinging between different languages as it is? I like Java a lot, but I’m sure that I could like for example c# as well. There is no contradiction in that.

What relevance does a four year old article have in this world anyway? What relevance would such an article about .net have? Slim to none, is my somewhat uneducated guess.

Well, just wanted to let you know. As I said, I like your blog a lot anyways.

regards
martin