4 ms·
That's not completely wrong, but also misses some nuance. E.g. the thread mentions the fact that web support is still stuck at XSLT 1.0 as a reason for removal.
by xg15 1y ago
That's not completely wrong, but also misses some nuance. E.g. the thread mentions the fact that web support is still stuck at XSLT 1.0 as a reason for removal.
But as far as I know, there were absolutely zero efforts by browser vendors before to support newer versions of the language, while there was enormous energy to improve JavaScript.
I don't want to imply that if they had just added support for XSLT 3.0 then everyone would be using XSLT instead of JavaScript today and the latest SIMD optimizations of Chrome's XPath pipeline would make the HN front-page. The language is just too bad for that.
But I think it's true that there exists a feedback loop: Browsers can and do influence how much a technology is adopted, by making the tech less or more painful to use. Then turning around and saying no one is using the tech, so we'll remove it, is a bit dishonest.
- jerf 1y agoJavascript was instantly a hit from the day it was released, and it grew from there. XSLT never took off. Ever. It has never been a major force on the web, not even for five minutes. Even during the "XML all the things!" phase of the software engineering world, with every tailwind it would ever had, it was never a serious player. There was, at no point, any reason to invest in it any farther. Moreover, even if you push a button and rewrite history so that even so it was heavily invested in anyhow, I see no reason to believe it would have ever been a major force in that alternate history either. I would personally contend that it has always been a bad idea, and if anything, it has been unduly propped up by the browsers and overinvested in as it is. But perhaps less inflammatorily and more objectively, it has always been a foreign paradigm that most programmers have no experience in, and this was even more true in the "XML all the things!" era which predates the initial Haskell burst that pushed FP forward by a good solid decade, and the prospects of it ever being popular were never all that great.
- em-bee 1y agoi also don't see XSLT solving any problem that javascript could not solve. heck, if you rally need XSLT in the browser, using javascript you could even call some library like saxonjs, or you could run it webassembly.
- youngtaff 1y agoHow do you format a raw XML file in the browser without XSLT?
- em-bee 1y agoinstead of including a reference to the XSLT sylesheet apparently you can also include javascript: https://stackoverflow.com/a/16426395 https://stackoverflow.com/a/16426395
- youngtaff 1y agoBut can it transform / format the XML?
- LegionMammal978 1y agoThat's only if the original document is an XHTML document that will have scripts loaded. Other XML documents, such as RSS feeds, will not have any support for JS, short of something silly like putting it in an iframe.
- em-bee 1y agoi didn't test it, but the stackoverflow answers suggested otherwise. are they wrong?
- GoblinSlayer 1y ago>while there was enormous energy to improve JavaScript What was the point of it though? People transpile from other languages anyway and pull megabytes of npm dependencies.
- afiori 1y agoThis question in analogous to what is the point of better CPUs when people use compilers/assemblers instead of writing binaries in an hex editor.