Monday, September 13, 2010

Whatever happened to XSLT?

Many, many years ago I built a website that used XHTML/XSLT to render all of the pages (this was back in the old-school ASP days). It worked a treat, and I’ve had a certain regard for XSLT ever since.

Which is why I was curious when some colleagues were tasked with building an email template system for an ecommerce system (large ecommerce systems can have dozens of email templates covering things like order confirmation, registration, forgotten password etc.) and then decided to use their own custom templating language.

Surely this is what XSLT was invented for – taking one block of XML (e.g. order details) and transforming it into another (an XHTML representation of the order)? “Too hard” came the reply; “it’s another language to learn” was another.

I wondered if this was a wide-spread complaint, so did a quick Google, and it appears as if XSLT has dropped into a black hole. It’s either so ubiquitous that no one talks about it anymore (it just works), or people are genuinely turned off by it.

It’s a shame, because with all of the fuss about DSLs these days, XSLT deserves an honourable mention.

No comments: