4 ms·
With browser being as complicated as they are, I kind of support this decision. That said, I never used XSLT for anything, and I don’t see how is its support i
by yoz-y 1y ago
With browser being as complicated as they are, I kind of support this decision.
That said, I never used XSLT for anything, and I don’t see how is its support in browsers tied to RSS. (Sure you could render your page from your rss feed but that seems like a marginal use case to me)
- Maxious 1y agoIf you view an RSS or Atom feed in chrome today you just get a screen of xml eg. https://developer.wordpress.org/news/feed/ https://developer.wordpress.org/news/feed/ In the golden old days of 2018, browsers at least applied some styling https://evertpot.com/firefox-rss/ https://evertpot.com/firefox-rss/ You can still manually apply styling using xslt https://www.cedricbonhomme.org/blog/index.xml https://www.cedricbonhomme.org/blog/index.xml
- yoz-y 1y agoIn Safari at least clicking a rss link prompts you to open it in a rss reader, which I think is a superior experience. Reading a rss feed in browser is not without use, but I’d argue that that’s mostly the job of the site itself.
- zerkten 1y agoThe sites sometimes want to provide some special formatting on top of the RSS without modifying it. For example, you might point people to available RSS readers which may not be installed or provide other directions to end users. RSS feeds are used in places other than reading apps. I've seen people suggest that this transformation could be done server-side, but that would modify the RSS feed which needs to be consumed.
- internetter 1y ago> You can still manually apply styling using xslt Unless I'm using XSLT without knowing, you can do this with the xml-stylesheet processing instruction https://boehs.org/in/blog.xml https://boehs.org/in/blog.xml
- lifthrasiir 1y agoBut XSLT is not strictly required for styling. In fact, Firefox also supports an out-of-band stylesheet inclusion via the `Link` HTTP header [1]: Link: </style.css>; rel=stylesheet (Yes, this works even without <?xml-stylesheet?> PI others have mentioned.) I think the best strategy for Google is to support this and simultaneously ditch XSLT. This way nothing is truly lost. [1] You can test your browser from: https://annevankesteren.nl/test/html-element/style-header.php https://annevankesteren.nl/test/html-element/style-header.ph...
- kevin_thibedeau 1y ago> nothing is truly lost. XSLT does much more than CSS.
- lifthrasiir 1y agoTechnically yes, but so what? The RSS use case is almost the only thing XSLT can uniquely provide (at the moment). Every other use case of XSLT can be done in other ways, including the use of server-side XSLT processors.
- randunel 1y agoWould you be willing to entertain the idea that, perhaps, you haven't noticed you actually used XSLT during your mundane browsing? Sample page, how would you tell? https://www.europarl.europa.eu/politicalparties/index_en.xml https://www.europarl.europa.eu/politicalparties/index_en.xml
- yoz-y 1y agoNaturally I meant as a developer. I don’t doubt I came past xslt rendered pages.
- cedilla 1y agoSure there are examples of websites using XSLT, but so far I've only seen the dozen or maybe two dozen, and it really looks like they are extremely rare. And I'm pretty sure the EU parliament et. al. will find someone to rework their page. This really is just a storm in a waterglass. Nothing like the hundreds or tens of thousands of flash and java applet based web pages that went defunct when we deprecated those technologies.
- efilife 1y agoYou ignored the argument (though probably not intentionally). You talk about how many you've seen. But you probably seen way more and never realized
- cedilla 1y agoIf there were that many, why do people only list the same handful again and again? And where are all the /operators/ of those websites complaining? Is it possible that installing an XSLT processor on the server is not as big a hassle as everyone pretends? Again: this is nothing like Flash or Java applets (or even ActiveX). People were seriously considering Apple's decision to not support Flash on iPhone as a strategic blunder due to the number of sites using it. Your local news station probably had video or a stock market ticker using Flash. You didn't have to hunt for examples.
- sltkr 1y agoFor RSS feeds, XSLT stylesheets are used to display a human-readable version in the browser. Random example: https://lepture.com/en/feed.xml https://lepture.com/en/feed.xml This is useful because feed URLs look the same as web page URLs, so users are inclined to click on them and open them in a web browser instead of an RSS reader. (Many users these days don't even know what an RSS reader is). The stylesheet allows them to view the feed in the browser, instead of just being shown the XML source code.
- nomercy400 1y agoAren't there other ways to load and parse a technical format like RSS to a human-readable format? Like you would do with JSON. Or can't you polyfill this / use a library to parse this?
- sltkr 1y agoYou can do the transformation server-side, but it's not trivial to set it up. It would involve detecting the web browser using the "Accept" header (hopefully RSS readers don't accept text/html), then using XSLT to transform the XML to XHTML that is sent to the client instead, and you probably need to cache that for performance reasons. And that's assuming the feed is just a static file, and not dynamically generated. In theory you could do the transformation client side, but then you'd still need the server to return a different document in the browser, even if it's just a stub for the client-side code, because XML files cannot execute Javascript on their own. Another option is to install a browser extension but of course the majority of users will never do that, which minimizes the incentive for feed authors to include a stylesheet in the first place.
- nomercy400 1y agoHow about using Javascript to fetch the XML (like you would do with JSON), and then parse/transform it with a Javascript or wasm XSLT library? Just like you would do with JSON. You need a server to serve Json as well. Basically, see XML as data format. RSS readers are not chrome, so they have their own libraries for parsing/transforming with XSLT.