←back to thread

418 points akagusu | 5 comments | | HN request time: 0.001s | source
Show context
Aurornis ◴[] No.45955140[source]
I have yet to read an article complaining about XSLT deprecation from someone who can explain why they actually used it and why it’s important to them.

> I will keep using XSLT, and in fact will look for new opportunities to rely on it.

This is the closest I’ve seen, but it’s not an explanation of why it was important before the deprecation. It’s a declaration that they’re using it as an act of rebellion.

replies(10): >>45955238 #>>45955283 #>>45955351 #>>45955795 #>>45955805 #>>45955821 #>>45956141 #>>45956722 #>>45956976 #>>45958239 #
James_K ◴[] No.45955821[source]
I use XSLT because I want my website to work for users with JavaScript disabled and I want to present my Atom feed link as an HTML document on a statically hosted site without breaking standards compliance. Hope this helps.
replies(2): >>45955882 #>>45958444 #
matthews3 ◴[] No.45955882[source]
Could you run XSLT as part of your build process, and serve the generated HTML?
replies(4): >>45955943 #>>45955956 #>>45956760 #>>45959294 #
James_K ◴[] No.45955943{3}[source]
No because then it would not be an Atom feed. Atom is a syndication format, the successor to RSS. I must provide users with a link to a valid Atom XML document, and I want them to see a web page when this link is clicked.

This is why so many people find this objectionable. If you want to have a basic blog, you need some HTML docments and and RSS/Atom feed. The technologies required to do this are HTML for the documents and XSLT to format the feed. Google is now removing one of those technologies, which makes it essentially impossible to serve a truly static website.

replies(2): >>45955974 #>>45956484 #
ErroneousBosh ◴[] No.45955974{4}[source]
> Google is now removing one of those technologies, which makes it essentially impossible to serve a truly static website.

How so? You're just generating static pages. Generate ones that work.

replies(1): >>45956162 #
James_K ◴[] No.45956162{5}[source]
You cannot generate a valid RRS/Atom document which also renders as HTML.
replies(1): >>45956531 #
shadowgovt ◴[] No.45956531{6}[source]
So put them on separate pages because they are separate protocols (HTML for the browser and XML for a feed reader), with a link on the HTML page to be copied and pasted into a feed reader.

It really feels like the developer has over-constrained the problem to work with browsers as they are right now in this context.

replies(1): >>45956725 #
kuschku ◴[] No.45956725{7}[source]
> So put them on separate pages because they are separate protocols

Would you also suggest I use separate URLs for HTTP/2 and HTTP/1.1? Maybe for a gzipped response vs a raw response?

It's the same content, just supplied in a different format. It should be the same URL.

replies(3): >>45956969 #>>45958694 #>>45959471 #
shadowgovt ◴[] No.45959471{8}[source]
Then the server should supply the right format based on the `Accept` header, be it `application/rss+xml` or `application/atom+xml` or `text/xml` or `text/html`.

Even cheaper than shipping the client an XML and an XSLT is just shipping them the HTML the XSLT would output in the first place.

replies(2): >>45960160 #>>45972299 #
kuschku ◴[] No.45960160{9}[source]
That's not exactly cheap on an arduino uno 3 with 2kb ram.

But regardless, someone suggested just including a script tag with xmlns of xhtml as alternative, which should work well enough (though not ideal).

replies(1): >>45963766 #
1. ErroneousBosh ◴[] No.45963766{10}[source]
How many people out of the world's nearly eight billion population, would you estimate, are attempting to host their blog including HTML posts and RSS feeds on an Arduino?
replies(1): >>45963941 #
2. kuschku ◴[] No.45963941[source]
A lot of IoT devices use this strategy, actually. A lot. Significantly more than are using e.g. WebUSB.

Nonetheless, by that same argument you could just kill HN off. A lot of projects have a benefit that far outweighs their raw usage numbers.

replies(1): >>45970115 #
3. ErroneousBosh ◴[] No.45970115[source]
I guess that tracks for Internet of Shitty Insecure Badly-Designed Things.

Come up with the worst possible way to present information over a web page.

What device with 2kB of RAM is going to generate any kind of useful RSS feed? Why would you not use something more capable, which is not only going to have more memory but also a lower power consumption?

replies(1): >>45970420 #
4. kuschku ◴[] No.45970420{3}[source]
> What device with 2kB of RAM is going to generate any kind of useful RSS feed?

Such devices usually don't generate RSS feeds, but e.g. sensor measurements as XML (which can be processed directly, or opened in a browser with XSLT to generate a website and an SVG chart from it)

> Why would you not use something more capable, which is not only going to have more memory but also a lower power consumption?

Because anything else will have >100× more power consumption?

replies(1): >>45979213 #
5. ErroneousBosh ◴[] No.45979213{4}[source]
Compare the power consumption of the atmega328p on an Arduino Uno 3 mentioned further up this thread, with the power consumption of literally any ARM chip smaller than the sort of thing you'd use in a laptop.