Death Comes for XSLT

Posted by colejohnson66 4 hours ago

Counter43Comment27OpenOriginal

Comments

Comment by daylily 55 minutes ago

I find XSLT removal a rather bad argument for "browser vendors bad". Browser vendors do of course make bad decisions that impact people to serve their own purposes, but in this case the "people" in question are just bloggers who want their RSS feed to render pretty on the browser, which isn't all that consequential and makes the whole discussion look like frivolous outrage. There are probably way better examples to lead with.

Edit: You don't need XSLT to style your feeds. I've been using a script that does the same [1], because browsers will read and run XHTML <script> tags inside any XML document.

[1]: https://dayli.ly/misc/render-feed/

Comment by xp84 19 minutes ago

Ahh, is that it? I was wondering what on earth XSLT had to do with the RSS feeds as alluded to on the .rip site.

Google can do literally nothing to disrupt RSS since its only important use is in real feed readers, which Chrome isn't.

Surely free-tier ChatGPT can in 5 minutes make a replacement that you could use to parse an RSS feed and render whatever you want. I guess it wouldn't be at the exact feed URL, though the server could use User-Agent to cheat at that, probably.

Comment by kenferry 1 hour ago

Seems rather absolutist. XSLT was an idea that sounded good, but in practice was quite awkward (like many xml technologies) and never got off the ground. Do we really need to hang every failed experiment around browser vendors' necks forever? I would prefer they work on things people care about.

From one of the issue trackers:

"While it's important to not break existing web content, it's also important to prevent security vulnerabilities. XSLT has been in maintenance mode in browsers and has been an ongoing source of security issues."

Comment by pmarreck 51 minutes ago

> and never got off the ground

LOL, what?? I used to work in shops, circa early 2000's, where 100% of the report-generation was driven by XSLT. I'm pretty sure it had massive corporate penetration at some point, especially when riding along with Microsoft's pervasive-at-the-time support of the standard. And I'm sure it's still got decent penetration out there.

Comment by xp84 28 minutes ago

> had

> massive corporate penetration

By this standard, every desktop should still ship with a copy of Internet Explorer 6. Most of what made it "special" compared to say, the contemporary Firefox 2.0, was its huge pile of special sauce used only in corporate settings. That stuff had massive corporate penetration as well, but we moved on because ActiveX in the browser wasn't worth the security cost of keeping it around.

If there are important legacy things sitting around corporate environments that literally require XSLT to function, they've had over a year of warning in which to sort it out -- port it to something else, or, pick some alternative browser, pin its version, and set it up with a proxy that can only access your weird XSLT sites. They'll be improving their own security posture with that move, as well!

Random corporations' failure to plan doesn't constitute a need for the rest of the world to continue to maintain obsolete technologies for free.

Comment by cowlevel 20 minutes ago

You can install an XSLT processor plugin in a corporate setting. This is about the public web.

IMO the main use of client-side XSLT was making people say "what the-?" when they viewed source, because they'd get an XML document full of your entirely custom tags, not the output of the XSLT processor. Which is pretty cool in itself but not worth the attack surface.

Comment by kenferry 36 minutes ago

In a browser? I mean, maybe so in which case, interesting. I agree it had and has more use outside the browser.

Comment by ergonaught 35 minutes ago

We used XSLT for literally every UI, for generating C++ for certain types of classes, and for generating SQL for very large reporting systems, etc. It was used in damned near everything.

Bummer, I guess.

Comment by xp84 26 minutes ago

Did any of that stuff happen in the browser, though?

I never learned the first thing about it, other than its name, so I'll admit ignorance.

Comment by ProAm 10 minutes ago

> Do we really need to hang every failed experiment around browser vendors' necks forever?

<blink> has entered the chat </blink>

Comment by jauntywundrkind 32 minutes ago

I saw it get used a lot.

The "we tried, it failed" story would be a lot more interesting in its bland boring shitty conservative dismissal rejection if the browsers had ever tried to support it. XSLT shipped 1.0 in 1999 and the browsers afaik never once ever did any further work, never bothered on the 2.0 (2007, incredibly better), 3.0 (2017), or new 4.0 (upcoming). Devs had to deal with the pretty jank early version, which changed a lot for 2.0! Massively! For massive betterment.

It's so so cheap and easy to discard and downput. I recommend to those desiring the path of the engineer the builder to be more sensitive. To tune in to what is good, what aspects did work. Look for value. The people in this world need those instincts, to look and assess and collect. The story of why things maybe don't work is the contrapositive failure, the same post hoc ergo propter hoc, but for the failure case. It's wrong, or at least, it usually misses the realer stories. It's a bad analysis filter.

This refusal to ever see the maybe, better, possibly rejects your ability to see and tune for more. Progress on, stop rejecting. Get good. Find good. Look for the good. Bring out the good. Or if not, consider the perhaps. If nothing else, more neutrally: let not you tie your wagon every time to the current of what is! (Another world is possible.)

Comment by telebub 2 hours ago

I find this whole removal idea a bit lazy. In theory some logic possibly declares some aspects of the BOM/DOM must be JS for introspection reasons, etc, but the reverse can't really be true.. There's nothing that can declare things like XSLT must be more native than a little trick with a otherwise standard JS VM, so the unique security edges of delegating things to a second class backwards support level could be quite small.

Comment by sheepscreek 1 hour ago

I have good memories of using XSLT. It was a neat idea at the time.

I suppose the world has nearly moved away from XML (for browsers, not yet for folks still enjoying SOAP APIs). And as a result, XSLT has fallen into obscurity.

Comment by rhdunn 1 hour ago

XML is still used for various formats like RSS (podcasts), SVG, sitemaps, and EPUB metadata (OPS).

XSLT is still used on the server back-end for rendering publisher documents (JATS, etc.) and for things like US bills.

Comment by xp84 7 minutes ago

Don't forget the Microsoft and the competing Open Office's twin XML formats.

Basically it's like a list of everything that was clean-sheet invented like ~ 1996-2007 used XML, then over the course of about 2 years it transitioned, and almost nothing invented after 2009 or so used it. It was like the whole software industry realized what a huge mistake and pivoted to JSON, all at once.

Comment by sheepscreek 3 minutes ago

I should have clarified I meant XML is no longer seriously considered for any new protocols/formats.

For XML, we can add docx/xlsx/pptx/odt/ods/odp to the list.

Comment by MrMorden 2 hours ago

Only the XSLT that ships with browsers.

Comment by antonvs 1 hour ago

Yeah, all my own use of XSLT was in back-end pipelines. But I don't miss it. It suffers from the same problem as many such systems - great if what you're doing is directly supported by the tool, terrible if you need to go beyond that.

Comment by ajasmin 1 hour ago

Aren't browsers implementations of the XSLT and XPATH standards really out of date to start with?

What would be a modern equivalent of a JSON to HTML transformer?

Comment by pornel 1 hour ago

They are (were), and the implementation was poor anyway - the transform is not dynamic, and not even progressive. It's just a high-latency legacy static templating engine you can't upgrade.

Comment by daylily 1 hour ago

JSON is much easier to directly access and manipulate in JS compared to XML, so I think you'd just fetch() it directly and then plug the data into something like lit-html. Which probably doesn't need bundling either since it's just template functions.

Comment by pmarreck 48 minutes ago

> JSON is much easier to directly access and manipulate in JS compared to XML

and yet a single newline in a text field will shatter its validity or force you to enter escaping-hell.

(I tamed that entire general problem by making https://github.com/pmarreck/printable_binary, and it will permit you to pack all binary data into a string, without any escaping issues, while retaining ascii legibility, although that requires a decoding step.)

Comment by Joker_vD 37 minutes ago

> and yet a single newline in a text field will shatter its validity or force you to enter escaping-hell.

So would a single & or > in the body of an XML element, you know.

Comment by wewewedxfgdf 17 minutes ago

I'm not going to the funeral.

Comment by euroderf 1 hour ago

Couldn't XSLT be rewritten not to use XML? It has all the visual appeal of a packaging accident in the hardware aisle. How would iXML implement the same functionality?

Comment by cowlevel 16 minutes ago

Rewriting it in JavaScript would probably give you React - not joking.

Comment by jauntywundrkind 1 hour ago

Good LWN coverage from a bit ago, https://lwn.net/Articles/1034560/

It's just an idea & very amorphous, but I dig Dorian Taylor's swet. As an idea of where we could go. wasm but also how it gets used too, what xslt could mean. https://github.com/doriantaylor/swet

Worth repeating again that the browser's never really maintained or supported XSLT at all. That, afaik, it never got past 1.0 era support. Which was bad. But there's a 2.0 (vastly better!), a 3.0, and at the same time the browsers decided not to support xslt, a 4.0.

XSLT is not a straight fit for use, doesn't seem likely to become a mainstream technology. But it's incredibly powerful & very declarative a way to produce, to transform. In that way, it's one of the most RFC 8890 The Internet Is For End Users specifications of all time, one of the only places where we can describe what is fundamentally compute as clear data, without all the opinion and decoration of code, in a clear way. We could build visualizations and explainers of what XSLT is happening, what productions are occuring, that illuminate what the page is doing, that link data in to data out in a traceable, clear, identifiable way. That the arbitrariness of code can compete with, but never so universally, only by creating it's own bespoke particular solutions, where-as XSLT has some universality.

I'm both pretty sad at the situation, but ultimately, I don't think the browser's bad choice & their laziness to help make the right thing possible matters. There's great good here, and their lack of doing the right thing doesn't actually slow things down. The problem is still that we just lack the will of the good, that developers and more so enterprises want to do the big industrial stacks, but that that is totally decoupled from what is good for the web, what is good for the users.

Comment by 2 hours ago