←back to thread

418 points akagusu | 1 comments | | HN request time: 0.368s | source
Show context
dfabulich ◴[] No.45955306[source]
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(7): >>45955537 #>>45955587 #>>45955938 #>>45955985 #>>45956639 #>>45956745 #>>45958606 #
ndriscoll ◴[] No.45955537[source]
> 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...

replies(5): >>45955706 #>>45955862 #>>45955946 #>>45956123 #>>45957628 #
munificent ◴[] No.45955862[source]
> XSLT is declarative and builds pretty naturally off of HTML for someone who doesn't know any programming languages.

Have you ever met a single non-programmer who successfully picked up XSLT of their own volition and used it productively?

I'd be willing to bet good money that the Venn diagram of users that fit the intersection of "authoring content for the web", "care about separating content from HTML", "comfortable with HTML", "not comfortable with JavaScript", and "able to ramp up on XSLT" is pretty small.

At some point, we have to just decide "sorry, this use case is too marginal for every browser to maintain this complexity forever".

replies(7): >>45955905 #>>45955908 #>>45956026 #>>45956251 #>>45956661 #>>45957052 #>>45958127 #
ndriscoll ◴[] No.45955908[source]
I was such a non-programmer as a child, yes. At the time that XSLT was new, if you read a book on HTML and making web pages from the library, it would tell you about things like separating content from styles and layout, yes. Things that blew my mind were that you could install Apache on your own computer and your desktop could be a website, or (as I learned many years later) that you could make a server application (or these days now Javascript code) that calls a function based on a requested path instead of paths being 1:1 with files. By contrast, like I said XSLT was just a natural extension of HTML for something that everyone who's written a couple web pages wants to do.

The fact that the web's new owners have decided that making web pages is too marginal a use-case for the Web Platform is my point.

replies(1): >>45955954 #
ErroneousBosh ◴[] No.45955954[source]
> it would tell you about things like separating content from styles and layout, yes.

That's what CSS does.

replies(2): >>45956009 #>>45957449 #
1. antod ◴[] No.45957449[source]
XSLT is really separating (XML) data from markup in the case of the web. More generally it's transforming between different XML formats.

But in the case of docs (eg XML-FO for docbook, DITA etc) XSLT does actually separate content from styling.