I've been using XSLT on RSS feeds forever now. It's a pretty awesome way to make it browser-accessible now that no browsers want to natively handle feeds. If you want to self-host an XSL for a feed it can be tricky serving the feed with the right Content-Type because some browsers want to throw feeds over to an external app even though they can display it themselves.
My favorite part is styling makes XML serve its original purpose on the web. It's just data serialization that can be interpreted by different user agents in different ways. A feed reader can do feed reader stuff but a web browser can still display a nicely styled human readable output.
XSLT is a really underused technology. It does not have a great developer experience but it's really powerful. It's also built into every web browser released in the past twenty years. Instead of megabytes of JavaScript to download, interpret, and run just to stylize some serialized data an XSL can do it all native in the browser.
PeterStuer 4 days ago [-]
Totally breaks some RSS readers that render the page before processing.
giantrobot 3 days ago [-]
An RSS reader should not be paying any attention to a stylesheet. That is not part of the RSS or ATOM schema and is irrelevant to the "feed" portion of the document. If you come across a feed reader applying a stylesheet you should report it as a bug.
ccbikai 3 days ago [-]
However, the compatibility differences among various browsers are significant, and the adaptation difficulty is also very high.
giantrobot 2 days ago [-]
WebKit and Gecko based browsers, so basically every device with a screen, supports XSLT 1.0 just fine. Even the old IE Trident engine had good support for XSLT. For styling an RSS feed XSLT 1.0 will do everything you need and that spec has been out for close to 26 years. I don't know what compatibility problems you're expecting.
Typically browser engines that don't support an XML specification version will do the proscribed thing and ignore it. So some old Series 60 WAP browser (were you to find such a thing today) would ignore the XSL stylesheet and display the raw XML or hand it to the registered handler for the content type.
The world went bonkers supporting XML on every computing platform under the Sun for nearly a decade.
WorldMaker 3 days ago [-]
The use of Tailwind feels rather bloated to me. Seems a big part of why it is 22KB for RSS.xsl. Not that you necessarily need to code golf an XSLT file to be as small as possible, but it just contributes to my disregard for Tailwind itself as a source of bloat as another example from the wild where Tailwind seems verbose and baroque.
ccbikai 3 days ago [-]
Yes. Let me figure out a way to optimize Tailwind and remove unnecessary CSS.
My favorite part is styling makes XML serve its original purpose on the web. It's just data serialization that can be interpreted by different user agents in different ways. A feed reader can do feed reader stuff but a web browser can still display a nicely styled human readable output.
XSLT is a really underused technology. It does not have a great developer experience but it's really powerful. It's also built into every web browser released in the past twenty years. Instead of megabytes of JavaScript to download, interpret, and run just to stylize some serialized data an XSL can do it all native in the browser.
Typically browser engines that don't support an XML specification version will do the proscribed thing and ignore it. So some old Series 60 WAP browser (were you to find such a thing today) would ignore the XSL stylesheet and display the raw XML or hand it to the registered handler for the content type.
The world went bonkers supporting XML on every computing platform under the Sun for nearly a decade.
All of this during the Holiday Season too!
Here's HN's rss
https://rss.beauty/rss?url=https%3A%2F%2Fnews.ycombinator.co...