Hacker News new | past | comments | ask | show | jobs | submit login

This post starts with a legitimate gripe about XSLT being classified as a "functional" language but then it devolves into a merit-less rant. It makes me wonder what the author uses XSLT for. It sounds to me like he's trying to use it as a general-purpose language. It is not. It's an incredibly single-purpose language for translating one XML document into another, and it makes no pretense of being otherwise. I've been using XSLT in large, multi-file projects for years (so I'm exactly the kind of programmer who "likely knows [he's] right"), and there is absolutely no substitute for what it does.



It's a unique tool for some important tasks.

It's also terribly opaque, and I'm afraid the community isn't very helpful. As a n00b I've worked with Apache, Bind, Python, bash, JavaScript, XSLT. None were harder to learn than XSLT. I've _used_ this tool, and it still takes me hours to figure out how sheets I've written actually work. The documentation is awful -- I have some of the community leading texts right here on my shelf, they are almost worse than useless. Appeals to various fora were as unhelpful as any I've made anywhere.

There's little point complaining about any of that, that community doesn't owe anything to me or anybody else. But after investing weeks learning that tool, I've moved on and use other stuff in places where XSLT should be the answer. And I'm by no means surprised to find other people expressing frustrations about the thing.


> It's an incredibly single-purpose language for translating one XML document into another,

In the same way ColdFusion is "an incredible single-purpose language for translating databases into web pages": it's not, the difference is that XSLT has no alternative whereas CF has a billion.

> and there is absolutely no substitute for what it does.

That's the issue, XSLT is not "incredible", there's just very little alternative.


The parent post does not describe XSLT as "incredible," but rather as "incredibly single-purpose."


Perhaps the lack of a good substitute is why the author is so frustrated. Also, given that he works for a XML document processing company, I don't think he wants to use XSLT as a general purpose language.


I think plain old SAX makes a good substitute. It only lacks one (of the two) good things I like about XSLT, template matching. But Fowler suggests a way to get that: http://martinfowler.com/bliki/MovingAwayFromXslt.html

The other thing I like about XSLT is that it creates a hard code-boundary. But I hardly think its syntax makes that worth it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: