Top
Best
New

Posted by colejohnson66 3 days ago

Death Comes for XSLT(dbushell.com)
77 points | 64 commentspage 2
ChrisArchitect 3 days ago|
Related:

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

https://news.ycombinator.com/item?id=50134617

ajasmin 3 days 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?

pornel 3 days 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.
daylily 3 days 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.
Timwi 3 days ago|||
> JSON is much easier to directly access and manipulate in JS compared to XML

That doesn't sound like a hard thing to fix? JS already comes with a ton of APIs and “web technologies”, but creating an XML equivalent to JSON.parse/JSON.stringify is somehow outside the realm of the thinkable?

pmarreck 3 days 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.)

Joker_vD 3 days 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.

codedokode 3 days ago||
There are too many web standards that do not need to be built-in. Many of them can be implemented using JS or WASM library, and this would also reduce fingerprinting possibilities.

For example: base64 API, audio nodes API, canvas API, encryption etc.

And XSLT can be implemented this way as well.

t23414321 3 days ago|
No, * it will not work transparently at the same level *.

What you repeat, it's Google marketing bullshit of the only thing with which they could compete - JS engine.

codedokode 3 days ago|||
Browsers are too complicated and this is bad, for example, for creating more competition. And the reason they are complicated is there is too many web standards and too much legacy to support.
t23414321 3 days ago||
.. race to the bottom. "more competition" for.. ONE thing Google can do, nothing else (ads engine - not document browser).

Want to make browsers easier ? - removing JavaSript and *fixing browser bugs instead* ('outsourced' to the user) will do that better.

BTW JavaSript it's not W3 standard, XSLT is.

("Live and let live", "Don't break the Web" - "breaking web pages that were made 20 years ago is unlikely to result in bug reports")

tjansen 3 days ago|||
You can modify XML by including a script tag. Someone somewhere also created a script that allows you to transform your page with XSLT, using the embedded JavaScript.
t23414321 3 days ago||
Eat the dogfood then.
euroderf 3 days 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?
gucci-on-fleek 3 days ago||
I've used Slax [0] a few times before and it's pretty nice, but it has the same problems at every other small language—little documentation and no community.

[0]: https://news.ycombinator.com/item?id=48333823

cowlevel 3 days ago||
Rewriting it in JavaScript would probably give you React - not joking.
daylily 3 days ago||
XSLT is more like a templating engine, so none of the reactivity of React. Probably more like Handlebars or Pug.
test6554 3 days ago||
I had an xslt file that crashed my whole server. Was just supposed to render html for a page but things got recursive.
wewewedxfgdf 3 days ago||
I'm not going to the funeral.
daylily 3 days ago|
[dead]
xp84 3 days 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.