160 points · by colejohnson66 · 1y ago · 146 comments
1. Keep the standards simple. Avoid adding features if you can. Standards define implementations. Don't invert that pattern and make the standards morbidly obese.
2. Keep the features orthogonal. Don't create multiple ways of doing the same thing. Make sure that each feature plays well with the the others.
3. Maintain backwards compatibility. Don't break anything that depends on your standard. Don't frustrate your implementers and their customers with an endless game of whack-a-mole.
4. All the above are on a best-effort basis. Exceptions are acceptable under exceptional circumstances.
For some reason, the WHATWG has the diametrically opposite belief on all the above. Perhaps they should be called the Web upside-down standards. You have no problem adding features to the standards faster than anyone can read it. But maintaining and upgrading an old feature is somehow too far beyond your capability to justify keeping it around. I guess it's back to uni for me to figure out how I got this so wrong.
Consider, for example, RSS/Atom feeds. Certainly there are <link /> tags you can add, but since none of the major browsers do anything with those anymore, we're left dropping clickable links to the feeds where users can see them. If someone doesn't know about RSS/Atom, what's their reward for clicking on those links? A screenful of robot barf.
These resources in TFA are another example of that. The government or regulatory bodies in question want to provide structured data. They want people to be able to find the structured data. The only real way of doing that right now is a clickable link.
XSLT provides a stopgap solution, at least for XML-formatted data, because it allows you to provide that clickable, discoverable link, without risking dropping unsuspecting folks straight into the soup. In fact, it's even better than that, because the output of the XSLT can include an explainer that educates people on what they can do with the resource.
If browsers still respected the <link /> tag for RSS/Atom feeds, people probably wouldn't be pushing back on this as hard. But what's being overlooked in this conversation is that there is a real discoverability need here, and for a long time XSLT has been the best way to patch over it.
Really wish registerProtocolHandler were more popular. And I really wish registerContentType hadn't been dropped!
Web technology could be such a nexus of connectivity. We could have the web interacting with so much, offering tools for so much. Alas, support has largely gotten worse decade by decade. And few have taken up the chance.
Bluesky is largely using at:// urls. Eventually we probably could argue for support for our protocol. But web+at:// is permission less. Tools like https://pdsls.com can just become web based tools, with near no effort, if they want.
Part of the reason HTML 5/LS was created was to preserve the behaviour of existing sites and malformed markup such as omitting html/head/body tags or closing tags. I bet some of those had the same usage as XSLT on the web.
This has already been the norm for years. Feed auto discovery is decades old at this point.
> Part of the reason HTML 5/LS was created was to preserve the behaviour of existing sites and malformed markup such as omitting html/head/body tags or closing tags.
This is not true. It has always been valid to omit html/head/body tags and the closing tags of several elements. This is a valid HTML 4.01 Strict document, it follows all of the parsing rules of HTML 4.01 correctly, it is not malformed, it parses correctly in every browser, there is no ambiguity, there is no error handling taking place, and there is nothing incorrect at all about it:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title>Valid</title>
<p>This is a valid HTML 4.01 Strict document.I could have chosen a better example like quirks mode. My point was that they could have simplified the parser logic and implementation buren by dropping that. But they didn't.
They even went to great lengths to parse existing XML content (SVG, MathML, and XLink) in HTML documents without supporting namespaces.
So dropping XSLT support here is purely because they don't want to put the effort in implementing their own XSLT engine (in a "safer" language if they need to), or to properly support the maintenance of the open source lbraries they rely on. And dropping XSLT goes against why HTML 5/LS was originally created, which was to support all existing HTML and web content no matter what they looked like.
The microformats folks have a standard to embed machine-readable feed data into HTML, which seems a lot more practical to me after seeing how browser just ignore RSS:
https://microformats.org/wiki/h-feed
(I haven't tried it but it seems fine)
unfortunately(?) modern browsers are turning more into these sandbox and state managers with a few lower-level rendering engines bolted together (JS driving the DOM, plus CSS and SVG and audio and video and font and various image codecs and ...)
and if people want to copy the raw data URL the site can show them, plus HTTP provides the Accept and other headers for content negotiation so in theory the URL can be the same.
Because it was privileged at the start and now it’s been a working feature you could rely on for a generation.
> there's WASM and sites can have any kinds of codecs they want.
Can’t js your way into the browser opening an xml document and automatically applying the stylesheet as far as I know.
It's hard to say how much the cost will be on users. They will need to copy the URL and put it into some site that applies the XSLT. Likely there will be some page that does this from JS and people can simply make URLs like https://blabla.gov/apply-xslt?xml=....&style=... and put those on websites, right?
> Can’t js your way into the browser opening an xml document and automatically applying the stylesheet as far as I know.
Yes, that's definitely not ideal, but maybe the result of this deprecation will be that we get some kind of handler registration. (Though I saw the comments about similar failed initiatives.)
I’m sure ActiveX and Silverlight removal did too. And iframes not sharing cross domain cookies. And HTTP mixed content warnings. I get it, some of these are not web specs, but some were much more popular than XSLT is now.
The government will do what they do best, hire a contractor to update the site to something more modern. Where it will sit unchanged until that spec too is removed, some years from now.
The iPhone never supported Flash. But thanks to web standards it supports viewing RSS feeds and other weird XML/XSLT artifacts from the past to this day.
It seems like a very easy fix for the handful of websites that still use it.
You're probably going to save money, end of the day, just homebrewing some XSL drop ins with a real programming language.
I gotta say, as a mostly-defense XSL guy[1] who also knows his way around TS and Py, this is probably going to be a real boom time to kick this dumb XSLT work to the curb and do some high dollar contracting making JS/TS drop-ins for govcons and defense.
[1] Who also thinks XSLT is a joke told by an idiot. My morale? Oh, it's great.
Google says it's "too difficult" and "resource intensive" to maintain...but they've deliberately left that part of the browser to rot instead of incrementally upgrading it to a modern XSLT standard as new revisions were released so it seems like a problem of their own making.
Given their penchant for user-hostile decisions it's hard to give the chrome team the benefit of the doubt here that this is being done purely for maintainability and for better security (especially given their proposal of just offloading it to a js polyfill).
This makes absolutely no sense.
We could've had such a nice language. The efforts for a cleaner language and web platform API were there, but doctrine always said no because of legacy and people have moved on to alternatives now.
What is the typeof null specification bug? You mean that typeof null === 'object'? That's not a bug. It's also not WHATWG's responsibility, it's part of ECMAScript.
font: supported in all browsers https://caniuse.com/?search=font
frameset: supported in all browsers https://caniuse.com/?search=frameset
applet: supported in all browsers https://caniuse.com/?search=applet
> All of them were rarely used and had better alternatives available.
"Rarely used" is not enough of a justification
Note: Support for the <applet> element has been removed by all browsers. Therefore, calling document.applets always returns an empty collection.
https://developer.mozilla.org/en-US/docs/Web/API/Document/ap...For instance: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Rel...
The <applet> element has been removed (Firefox bug 1279218).
Also see https://github.com/mdn/content/pull/26850 which removed MDN docs for the element a couple years back, citing removals from major browsers.<font> and <frameset> are still implemented in browsers, though, even if they are fully deprecated and marked by WHATWG as obsolete and non-conforming: https://html.spec.whatwg.org/multipage/obsolete.html#non-con...
apparently firefox has their own implementation. not that that makes things any better. the firefox implementation appears to be just as bad in shape as the libxslt bindings in chrome. see here for more details: https://news.ycombinator.com/item?id=44910050
And yet they have no qualms shoving huge attack surfaces in the form of WebUSB, WebSerial, WebMIDI, WebTransport, WebBluetooth, WebKitchenSink, most of which have as much usage as XSLT: https://chromestatus.com/metrics/feature/timeline/popularity... or https://chromestatus.com/metrics/feature/timeline/popularity...
I was checking for XSLTProcessor out of curiosity, and most of the top sites seem to be all using Flarum as a software?
Found it a nice fun fact: https://chromestatus.com/metrics/feature/timeline/popularity...
If you check it though what they're using XSLTProcessor for, it seems to be a fallback for an MSXML polyfill, e.g. when you search for "XSLTProcessor" here you can see it: view-source:http://discuz.turzx.com/assets/forum.js?v=3c534b8a
So in the case of Flarum their DOMParser using alternative would chime in, as that's an additional fallback to the MSXML / ActiveX using polyfill.
> And yet they have no qualms shoving huge attack surfaces in the form of WebUSB, WebSerial, WebMIDI, WebTransport, WebBluetooth
This is not true. Both Mozilla and Apple rejected WebUSB, WebSerial, and WebBluetooth, and Apple rejected WebMIDI as well. Your list is mostly Blink-only APIs that Google have failed to convince other rendering engines to implement. And they all had lengthy discussions about security beforehand. So yes, browser maintainers definitely do have qualms about shoving those huge attack surfaces in there, and those qualms are a matter of public record you can read at your leisure.
> most of which have as much usage as XSLT
It doesn’t make sense to compare the usage of proposed features to a feature that has been implemented by all browsers for 25 years. Being available for 25 years and going almost entirely unused is a very strong signal that XSLT is not worth keeping around.
It’s that currently you can open an XML file (including feeds) with an associated stylesheet and the stylesheet gets applied, which can be used to render an HTML document on the client side from an xml source like a feed.
"Remove mentions of XSLT from the html spec" - https://news.ycombinator.com/item?id=44952185 - Aug 2025 (522 comments)
Should we remove XSLT from the web platform? - https://news.ycombinator.com/item?id=44909599 - Aug 2025 (96 comments)
There's potentially a real need for something like XSLT + XForms for low-to-no JS interactivity.
Even a basic JS-free, HTML-modifying operation for WebForms would go a long way towards that (ie: insert a row, delete an element matching this ID on click), etc.
I’m curious if you could describe more about what you envision. I have a difficult time imagining:
1. How the stateful/interactive aspects of XForms (such as insert/delete, as you mention) would be implemented client side without JS.
2. How XSLT factors into that vision.
It might be lack of imagination on my part! Admittedly, I don’t know everything about XSLT and maybe it has more interactive capabilities than I’m aware of. But at least as far as I know, when a browser vendor did implement XForms functionality it still ultimately depended on JS to achieve certain behaviors. It’s been a while since I was looking into this, but IIRC it looked conceptually similar to XUL. And granted, that might mean the JS is provided by a browser, and encapsulated from user space similar to browsers’ use of shadow DOM for standard form controls now.
1: I also have good reason to believe my work on this prior project helped keep XSLT alive in Chrome the last time there was a major push to deprecate it! Albeit totally inadvertently: my work just happened to correlate very closely to a spike in usage metrics around the same time, which was then cited as a reason to hold off on deprecation.
1. Associate a form element with a non-JS action, ie: add-element, remove-element, modify-element.
2. Allow those actions to make use of <template> elements when adding or modifying elements, and/or XPath selectors.
3. Add a new <input type=id> (or similar) that auto-generates unique UUIDs for form rows.
A mockup of what we'd get, though it's actually focused on pure HTML (it would be XML-compatible, however). This is 100% a straw-man, probably not even fully-self-consistent, but giving an idea of what I would want:
<h1>Declarative Form Example</h1>
<form action="/update" method="post">
<table id="people">
<thead>
<tr>
<th>First</th><th>Last</th><th>Email</th><th></th>
</tr>
</thead>
<tbody>
<!-- rows appear here -->
</tbody>
</table>
<button type="submit">Save</button>
</form>
<template id="row-template">
<tr data-row data-row-id data-bind:dataset(rowId)="row_id">
<td data-bind:text="first"><input type="hidden" name="first"><input type="uuid" name="row_id" autogenerate></td>
<td data-bind:text="last"><input type="hidden" name="last"></td>
<td>
<a data-bind:attr(href)="email_link" data-bind:text="email"></a>
<input type="hidden" name="email"><input type="hidden" name="email_link">
</td>
<td>
<button formmutate="remove"
formtarget='tr[data-row-id="{{row_id}}"]'
aria-label="Remove row"></button>
</td>
</tr>
</template>
<form id="add-person">
First <input name="first" required>
Last <input name="last" required>
Email <input name="email" type="email" required>
<input type="hidden" name="email_link" value="mailto:{{email}}">
<button formmutate="add" formtarget="#people > tbody" formtemplate="#row-template">Add</button>
</form>
Some existing standards/specs/proposals I cribbed this from:- https://html.spec.whatwg.org/multipage/scripting.html#the-te...
- (defunct) https://html.spec.whatwg.org/multipage/form-elements.html#th...
But as a meta comment, I'm surprised at the number of strong emotions on either side of this. I refused to believe that so many people knew or cared that XSLT was an existing feature in browsers before this all came up. And the hyperbole behind "this destroys the open web" blow my mind. I've been writing HTML since the mid 90s, and although I've known what XSLT is all along, I've never been in the room with anyone who claimed that they used it for any reason whatsoever.
Regardless of what happens, this is not the death of the open web. I have no doubt that certain people depend on having it in browsers, but there's no way it's required by more than a tiny portion of websites. Yes, this will be inconvenient and possibly expensive for those sites, and I am sympathetic to them. But the web? It's gonna be just fine without it, should that come to pass.
For example, I use it add an explanation of what RSS is and some styling to the RSS feed of my personal website [1].
[1] https://httpd.apache.org/docs/current/en/content-negotiation...
See if you parse an HTML page these days - heck, if you're lucky Anubis girl will let you in and see the javascript trash soup, maybe even taste it.
did you mean:
it seems like a pretty cut and dried case for removal (of a feature that is not only not used but even in cases where it might be useful the sites have html versions and don't expect people to click on the xml links) because it will break many government sites?
or
it seems like a pretty cut and dried case for removal (of a feature that is not only not used but even in cases where it might be useful the sites have html versions and don't expect people to click on the xml links) because the feature is not used etc. etc. ?
They are not peeling away browser complexity. They revel in browser complexity. They gleefuly make browser as complex as possible.... as long as their promotions depend on it: https://news.ycombinator.com/item?id=44989576
Say what you will about the popularity of each of them, but they can't exist without browser implementations. XSLT can be replaced with a polyfill.
Show me how a polyfill allows me to type https://example.com/rss.xml in the URL bar and have it transformed to HTML in the browser?
Removals sometimes take a decade or more, or sometimes don't happen at all. Just because the vendors would like to remove something, doesn't mean they can.
For example, MutationEvents were deprecated in 2011 and just removed last year.
So this is just the beginning of the process. Even the PR to remove XLST from the spec: it doesn't mean it's being merged soon. Removal from the spec is different from remove from engines.
https://github.com/whatwg/html/issues/11582#issuecomment-321...
Frankly I think this is a tempest in a teapot, and the primary reason people are complaining is because Google is sponsoring the idea, not because it's going to harm users in some tangible way.
XSLT accomplishes what json-ld and semantic html never managed.
The question of abstract efficiency via reuse is academic. If the XML documents were the ones that users accessed most of the time, or were the only documents available, that might change the analysis. But that isn't the case.
Or we could deprecate support for .txt and .xml in the browser itself, for the same reasons.
We obviously don't want that. It's valuable to have support for multiple formats, and it's especially valuable to have a single file that can be used by both machines and humans.
The counterpoint seems to be "well it has Javascript so we don't need actual features since you can theoretically write anything in JS" but one of the nicest things about it was having that toolkit available to Javascript. You can spin up a DOM for arbitrary XML and apply a bunch of natively-compiled, fast tools to it, coordinating and supplementing that with JS. Then present that to the UI as HTML. It's very nice.
I'm on team "the right move is to upgrade these, not remove them".
If they want to remove things to simplify the spec I've got a list I'd suggest, but it's mostly stuff added in the last decade.
But I think that was maybe just a mistake? Maybe he meant https://www.congress.gov/bill/117th-congress/house-bill/3617...
What are you talking about, it’s accomplished practically nothing‽
XSLT is a way to write code that takes one XML file and turns it into a different XML file. Its primary use case is to make RSS feeds look nicer in browsers. That’s it. It hasn’t solved the Semantic Web.
> Thanks for raising these 6 examples of sites publishing XML files. We can add it to the existing list of 357 sites
This feels like an email I'd get from HR. The point of the topic was the ease in finding those 6, not to discuss those 6 specifically. Maybe being direct pisses people off more than this corporate-styled language, though.
Then some random tag on guy presumably after this hit HN "I like that it doesn't have ads," which has literally nothing to do with the issue, lol.
It's incorrect to say there are no removals, as we do not have <MARQUEE> anymore.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="somefile.xsl"?>
...
Then the browser fetch somefile.xsl and uses that to transform the xml into html (which is then rendered as per the uzhe).Whether the browser does all that in C or C++ or Rust or Javascript or by sending it to an LLM is an implementation detail.
If the browser drops xslt support and just displays it as text (or syntax-hilighted xml), I, as the xml author, can't polyfill that by adding javascript to the xml because it won't be executed. You need to back up a level.
You could set up a web page that fetches the xml and fetch the xslt and transforms it into html and then displays it (so a browser in your browser so you can browse while you browse) but I wouldn't call that a polyfill exactly. If you're going to do that, it would be less work and a better user experience to do the transform server side.
https://caniuse.com/mdn-html_elements_marquee
The marquee element is deprecated but is supported by all major Web browsers.
The XML viewer is still there, there are colors and you can collapse the nodes.
XML was an abomination in terms of format but there were some really good ideas in the early web. I remember you could point to a stylesheet to apply to an XML file.
I really wish we could apply CSS stylesheets to a JSON.
You still can. That's exactly what this article is about: XSLT is that stylesheet. You can publish XML-structured data that machines can ingest, and you can attach XSLT to that data so that humans can view the exact same file in a human-friendly way. The browser constructs, according to the XSL transform rules, a Document Object Model out of the XML, and then it usually applies CSS to that DOM. No duplication of files, no "click here to get to the actual data." I've got some OPML (lists of podcasts) and RSS (podcast) XML files that are also human-readable web pages thanks to this; the exact same web address works for your favorite podcast app and for human viewing.
> I really wish we could apply CSS stylesheets to a JSON.
I don't think what you want is CSS in the first instance, but in the second: first you'd want a template transformation language like XLST is for XML. You'd want to be able to say not just "show these values in this font" but "for each key matching this pattern, create a DOM element containing that key, then another element containing its value," and then style them with CSS when a whole document has been generated out of the JSON. XML with XSLT almost always also included CSS to handle fonts and whatnot.
It is simple and works very well for simple documents.
Remember, XHTML was just an XML document.
"Is it possible that software is not like anything else, that it is meant to be discarded: that the whole point is to always see it as a soap bubble?" - Alan Perlis
Worst comic ever!
> Of course, they can't say this out loud, so they instead have @mfreed7 cherry-pick some numbers as justification. ( https://github.com/whatwg/html/issues/11582#issuecomment-321... )
Mason Freed (mfreed7), XSLT, 2025,
Jorge Villalobos, 'legacy' Firefox extensions, 2017,
..Mitchell Baker, ..Peter Daszak never will be forgotten for years of programmers lives lost and the pain they causing.
BUT since it's there, don't take it out, or at least take it out of the spec and then require all browser vendors to auto-install a plugin that re-performs the missing feature, and warn that this page relies on a plugin or something