logoalt Hacker News

Chrome and Edge are removing XSLT: what breaks and what does not

50 points • by croes • today at 8:07 PM • 49 comments • view on HN

Comments

mcculley • today at 9:57 PM

I am still using XSLT. I have been using it for 26 years. I generate XML documents on the backend and turn them into HTML for various reports. XSLT has a lot of features and power that newer templating languages lack.

Are any of these newer templating languages worth me switching?

➕ show 2 replies
cousin_it • today at 8:58 PM

When I first learned that XSLT was going away, I got curious how to achieve the same thing in JS (client-side templating that happens during page load, without any "flash of content"). It turns out there's a very nice way to do it, by using inline scripts that append elements next to document.currentScript. Lean Rada wrote about it here: https://leanrada.com/notes/inline-rendering-currentscript/ and I wrote about it as well: https://vladimirslepnev.me/write

➕ show 1 reply
Trustable8 • today at 8:50 PM

Shame back in the XHTML days XSLT was a spec that could have made website modularity so much cleaner. I once created an early website creation tool that merged separate components using XSLT it was really powerful in the days before javascript was usable without jQuery. However XHTML was dropped in favor of HTML5 and XSLT was pretty much useless after that. Its done well to survive this long I presume it was mainly kept to style XML files.

➕ show 4 replies
yokoprime • today at 9:21 PM

i just got flashbacks to a past life where i handcrafted XSLT to pre-render output from a service as HTML server side. Of course the front end was running some asp.net version and Microsoft flavored XSLT had lots of quirks.

hmokiguess • today at 10:02 PM

XSLT is glorious, too bad.

Velocifyer • today at 9:52 PM

What will we do for RSS/Atom feeds?

➕ show 2 replies
compiler-devel • today at 9:23 PM

In the age of LLMs I would expect that legacy code bet carried indefinitely. The LLMs will have it indefinitely in their training data, and with code "cheap" to produce now, what are the good reasons for dropping legacy code?

➕ show 2 replies
troupo • today at 8:38 PM

There's a long discussion about XSLT removal here: https://github.com/whatwg/html/issues/11578#issuecomment-595... (the link is to the comment with this proposal https://github.com/doriantaylor/swet which already is much better than any templating proposal "the platform" is trying to push)

jiggawatts • today at 9:13 PM

The breakage that sticks out to me is that IIS in Windows Server outputs some reports as XML+XSLT and these have become nigh unusable for years now.

I ignore every official statement about “support” and simply look at the horse's mouth: Microsoft hasn’t bothered to fix this in IIS, and likely never will.

It’s a dead product, “supported” only in a contractual sense, not a practical one.

(If you called support right now demanding fix for this, they’d tell you that it’s broken by design, have you tried moving to a recurring revenue service offering?)

tossit444 • today at 8:37 PM

503

➕ show 2 replies
pjmlp • today at 8:45 PM

Edge is Chrome.

➕ show 1 reply
krylonmae • today at 9:02 PM

Looks like the site broke

Devasta • today at 8:54 PM

It is wild to look back at XHTML and see that the W3C were entirely correct about XML. They envisaged a world of schemas, client side templating, custom elements, dynamic forms, the works.

Alas, for laughably bad reasons we had to scrap all that for HTML5, Javascript and CSS; a stack so awful that most devs doing anything on the frontend immediately scramble to React, TypeScript, Tailwind, whatever it takes to avoid the underlying garbage.

A horrid state of affairs that will only get worse as time goes on.

➕ show 4 replies