Chrome and Edge are removing XSLT: what breaks and what does not
doctor-seo.net51 points by croes 3 hours ago
51 points by croes 3 hours ago
Good riddance. XSLT and EJB marked the dark ages of software development. For a half decade nothing made sense and programmers and management were going along with the charade until everyone collectively realized it was complete garbage and just stopped using it. I remember replacing an XSLT/EJB system that processed one order per minute with a C++ system written in a week that processed 10,000/minute. A team of a dozen programmers had been working on that XSLT disaster for years.
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?
Yes, because XSLT won't work in Chrome and Edge anymore.
Their comment isn’t clear if they’re doing the transform on the server before piping it down as HTML, which some implementations have done over the years as it provided access to newer XSLT features that browsers stagnated on.
A great way to convince you you've always been wrong:
Step 1: Gain browser monopoly
Step 2: Generate fake security scare
Step 3: Gaslight everyone that only way to mitigate is to get rid of it completely like Flash.
Step 3a (corollary): There isn't anyone available that can fix the bugs because we spent all resources on UI/UX experimentation
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
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.
HTML5 could have taken the extra step of defining a canonical XML or XML-compatible DOM encoding, or at least encouraged it. But the anti-XML sentiment was explicit and spiteful. Still, popular XSLT processors are built to consume and even produce HTML5, I'm just not sure how thorough those capabilities are or whether they're based on any formal or informal standards. (Maybe the W3C has/had something like that, as part of it's attempts to rollup HTML5 snapshots into versioned standards?)
I lost any enthusiasm for XML after my experience with WDDX and XML-RPC, but as a foundation for HTML it was the best thing going. And maybe still is, given the absence of cross-toolchain contenders? Ditto for XSLT, at least if disregarding the choice to make the syntax homoiconic. In fact I circled back to XSLT long after it was clear it was a dead end. A good tool is a good tool, and the fact it remains so despite the wanton neglect only proves it.
> HTML5 could have taken the extra step of defining a canonical XML or XML-compatible DOM encoding, or at least encouraged it.
Yeah and then we could have called it xhtml5. Too bad that does not exist. Oh wait https://html.spec.whatwg.org/multipage/xhtml.html
> But the anti-XML sentiment was explicit and spiteful.
No, xhtml was just a bad idea creating tons of problems and solving none.
> xhtml was just a bad idea creating tons of problems and solving none.
Well an XHTML parser (and serializer) is a lot simpler, which is a pretty meaningful problem to solve.
What problems does xhtml create?
> Well an XHTML parser (and serializer) is a lot simpler
Perhaps, but a combined html and xhtml parser is more complex than just a html parser. Since html already is entrenched, xhtml would be in addition to html, not instead of.
The main one is that even a slightly broken XHTML document will fail to render. HTML is much more forgiving.
With the benefit of hindsight, if the web had been that way from the beginning, I think we would have been better off. The moment you tested your content in any browser, you'd immediately see if it was broken.
But it wasn't something that could get introduced later, after all the broken content that already existed.
Yeah, I think SGML HTML as the first pass was a mistake. All my early websites were XHTML until people called them "bad"...
With all respect - the opposite is true. The web succeeded because HTML and HTTP are easy standards easily writable by humans with text editors. HTML was writable by non-programmers.
I don't think "parsed strictly" makes something hard; on the contrary, I think it's helpful to make something easy. Clear feedback, easy to test.
But then, I've always preferred strongly typed over stringly typed.
This imagines HTML as code and not markup.
The reason HTML and markdown are more widely adopted than latex is because the former are more forgiving.