logoalt Hacker News

dfabulichtoday at 4:44 PM7 repliesview on HN

In part 1 of this article, the author wrote, "XSLT is an essential companion to RSS, as it allows the feed itself to be perused in the browser"

Actually, you can make an RSS feed user-browsable by using JavaScript instead. You can even run XSLT in JavaScript, which is what Google's polyfill does.

I've written thousands of lines of XSLT. JavaScript is better than XSLT in every way, which is why JavaScript has thrived and XSLT has dwindled.

This is why XSLT has got to go: https://www.offensivecon.org/speakers/2025/ivan-fratric.html


Replies

ndriscolltoday at 5:05 PM

> JavaScript is better than XSLT in every way

Obviously not in every way. XSLT is declarative and builds pretty naturally off of HTML for someone who doesn't know any programming languages. It gives a very low-effort but fairly high power (especially considering its neglect) on-ramp to templated web pages with no build steps or special server software (e.g. PHP, Ruby) that you need to maintain. It's an extremely natural fit if you want to add new custom HTML elements. You link a template just like you link a CSS file to reuse styles. Obvious.

The equivalent Javascript functionality's documentation[0] starts going on about classes and callbacks and shadow DOM, which is by contrast not at all approachable for someone who just wants to make a web page. Obviously Javascript is necessary if you want to make a web application, but those are incredibly rare, and it's expected that you'll need a programmer if you need to make an application.

Part of the death of the open web is that the companies that control the web's direction don't care about empowering individuals to do simple things in a simple way without their involvement. Since there's no simple, open way to make your own page that people can subscribe to (RSS support having been removed from browsers instead of expanded upon for e.g. a live home page), everyone needs to be on e.g. Facebook.

It's the same with how they make it a pain to just copy your music onto your phone or backup your photos off of it, but instead you can pay them monthly for streaming and cloud storage.

[0] https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...

show 5 replies
Pet_Anttoday at 5:09 PM

JavaScript is ever evolving and it means you need to stick to one of the two browsers (WebKit or Firefox) and keep upgrading. XSLT hasn't changed in years. It's an actual standard instead of an evolving one.

I know that other independent browsers that I used to use back in the day just gave up because the pace of divergence pushed by the major implementations meant that it wasn't feasible to keep up independently.

I still miss Konqueror.

show 1 reply
skobestoday at 5:47 PM

Your link is just the abstract, I had to hunt for the full talk:

https://www.youtube.com/watch?v=U1kc7fcF5Ao

But it is quite interesting and especially learning about the security problems of the document() function (described @ 19:40-25:38) made me feel more convinced that removing XSLT is a good decision.

kuschkutoday at 6:50 PM

> Actually, you can make an RSS feed user-browsable by using JavaScript instead

Say I have an XML document that uses XSLT, how do I modify it to apply your suggestion?

I've previously suggested the XML stylesheet tag should allow

    <?xml-stylesheet type="application/javascript" href="https://example.org/script.js"?>
which would then allow the script to use the service-worker APIs to intercept and transform the request.

But with the implementation available today, I see no way to provide a first-class XSLT-like experience with JS.

LtWorftoday at 6:58 PM

No you can't, since opening an RSS feed won't run a javascript.

throw_m239339today at 9:35 PM

> by using JavaScript instead

I think you're entirely missing the point of RSS by saying that. RSS doesn't and should require NOT Javascript.

Now feeds could somehow be written in some bastard HTML5 directly, but please don't bring Javascript in that debate.

XSLT allows to transform a XML document into an HTML presentation, without the need for javascript, that's its purpose.

ErroneousBoshtoday at 5:42 PM

> In part 1 of this article, the author wrote, "XSLT is an essential companion to RSS, as it allows the feed itself to be perused in the browser"

Wow. I can see the proposed scrapping of XSLT being a huge problem for all of the seven people who do this.