News for hackers. Stuff that matters.
Re:Open Letter to XSLT Fans by droithomme on Saturday April 07, 2012 @01:44PM (#3811493)
Wow, I wasn't aware there were any XSLT "fans" out there. I wonder where the author has been hanging out to find them.
Re:Open Letter to XSLT Fans by PaulHoule on Saturday April 07, 2012 @03:06PM (#3811804)
You find them, particularly in places where XML is taken too seriously. Also in places staffed with people who see unmaintainable code as their ticket to job security.

One trouble is that you know there's a cliff out there. There are some simple tasks that can be done with an XSLT that's just beautiful. But try to change what it does, and you reach this point where it becomes incomprehensible.

Back in the day we used to wonder if XSLT was Turing complete -- some guys wrote a paper and proved it, but that's the problem with XSLT. If it takes computer scientists half a decade to figure out if it's Turing complete or not, it's completely incomprehensible.

Re:Open Letter to XSLT Fans by hcayless on Saturday April 07, 2012 @08:59PM (#3812652)
I am one. But I do a lot of work with XML documents (not just data in XML form, but documents marked up in XML). XSLT is an invaluable tool for this problem domain, but it's a relatively small niche. I can easily imagine programmers getting frustrated with it if they aren't using it for its intended purpose, or even if they haven't yet grokked how it's supposed to work.

It's probably not quite a functional language by most definitions, but it has a lot of features common to functional languages, including immutable variables, no side effects, XSLT 2.0 does have first class functions, recursion, etc. The Saxon implementation of XSLT 2.0 even has lazy sequences (I'm not sure if that's a language thing, or just that implementation).

Without knowing what the OP is having to deal with, I can't really evaluate his complaint. I've certainly seen some hideous XSLT, but it doesn't have to be hideous, and it's great for the (pretty narrow) domain it was intended for.

You can abuse any programming language—I don't think XSLT is particularly special in that regard.

Re:Open Letter to XSLT Fans by simonw on Saturday April 07, 2012 @02:36PM (#3811667)
The BBC used to use XSLT a lot for templating web pages, and had a small cluster of XSLT adherents working for them. I believe they've mostly switched to PHP templates now.
Re:Open Letter to XSLT Fans by guard-of-terra on Saturday April 07, 2012 @03:51PM (#3811923)
"I believe they've mostly switched to PHP templates now." Oh my god make me unknow this.

(XSLT does actually have a standard, syntax checking and built-in context-sensitive quoting)

Re:Open Letter to XSLT Fans by reinhardt on Saturday April 07, 2012 @04:29PM (#3812028)
Reminded me of https://xkcd.com/224/: "honestly, we hacked most of it together with perl"
Re:Open Letter to XSLT Fans by SkyMarshal on Sunday April 08, 2012 @01:33AM (#3813183)
> My god, it's full of car's!

lmao. Thanks, hadn't seen that one.

Re:Open Letter to XSLT Fans by justincormack on Saturday April 07, 2012 @01:50PM (#3811510)
There are, I have met a few. Not one myself, but I do like the fact that it escapes properly, which most people working on templating solutions havent bothered to do.
Re:Open Letter to XSLT Fans by cies on Saturday April 07, 2012 @01:51PM (#3811513)
I know two.