Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)



Would 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


There exists a much better html version of that page, which also comes up as the first google result and is easier to discover on the website. https://www.europarl.europa.eu/about-parliament/en/organisat...


The lack of the jump scare cookie banner on the XSLT version is certainly an improvement, but I otherwise agree. Google search burying XSLT driven pages isn't a surprise given their stance.


I don't think there's any evidence to suggest that Chromium's position on this impacts Google's Pagerank algorithm at all.


I think Google has a general philosophy of the web that promotes crawlable HTML over other formats. I noticed recently that traditional job aggregators like XML job feeds, yet Google promotes JobSchema as an incompatible standard. So less that Chromium directs pagerank, and more that Google's genreral view of the web is HTML over XML. I hope JobSchema fails because it is harder to aggregate, unless you already index web pages at scale.

Although I don't have firm evidence, haven't worked at Google, and you likely know company dynamics better than I.


Sure 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.


Those had good rationale for deprecating that I would say don't apply in this instance. Flash and Java applets were closed, insecure plugins outside the web's open standards, so removing them made sense. XSLT is a W3C standard built into the web's data and presentation layer. Dropping it means weakening the open infrastructure rather than cleaning it up.


> 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.

Sure, but Flash and Java were never standards-compliant parts of the web platform. As far as I'm aware, this is the first time that something has been removed from the web platform without any replacements—Mutation Events [0] come close, but Mutation Observers are a fairly close replacement, and it took 10 years for them to be fully deprecated and removed from browsers.

[0]: https://developer.mozilla.org/en-US/docs/Web/API/MutationEve...


They are definitely rare. And I suspect that if you eliminate government web sites where usage of standards is encouraged, if not mandated, the sightings “in the wild” are very low. My guess would be less than 1% of sites use XSLT.


You ignored the argument (though probably not intentionally). You talk about how many you've seen. But you probably seen way more and never realized


If 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.


> If 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?

I've spent the last several years making a website based on XML and XSLT. I complain about the XML/XSLT deprecation from browsers all the time. And the announcements in August that Google was exploring getting rid of XSLT in the browser (which, it turned out, wasn't exploratory at all, it was a performative action that led to a foregone conclusion) was so full of blowback that the discussion got locked and Google forged ahead anyway.

> Is it possible that installing an XSLT processor on the server is not as big a hassle as everyone pretends?

This presumes that everyone interested in making something with XML and XSLT has access to configure the web server it's hosted on. With support in the browser, I can throw some static files up just about anywhere and it'll Just Work(tm)


If the server behavior can't be changed, there's a couple JavaScript engines to do the rendering client-side.


Running a script that interprets a different script to transform a document just complicates things. What do I do when the transform fails? I have to figure out how to debug both XSLT and JavaScript to figure out what broke.

I don't have any desire to learn JavaScript (or use someone else's script) just to do some basic templating.


What does one do when transform fails right now? You have to debug both XSLT and a binary you don't have the source for; debugging JavaScript seems like a step up, right?


I used to be able to load the local XML and XSLT files in a browser and try it. When the XSLT blew up, I'd get a big ASCII arrow pointing to the part that went 'bang'. It still only kind of works in FireFox

  XML Parsing Error: mismatched tag. Expected: </item>.
  Location: https://example.org/rss.xml
  Line Number 71, Column 3:
  </channel>
  --^
Chrome shows a useless white void.

I enabled the nginx XSLT module on a local web server serve the files to myself that way. Now when it fails I can check the logs to see what instruction it failed on. It's a bad experience, and I'm not arguing otherwise, but it's just about the only workaround left.

It's a circular situation: nobody wants to use XSLT because the tools are bad and nobody wants to make better tools because XSLT usage is too low.


Battle.net's forums used to use XSLT and be a buggy mess, but not sure if that was related to their use of XSLT.


It's possible to write buggy software in every language.


Some programming languages and runtimes encourage writing more bugs.


Then write it in languages that have debuggers, instead of XSLT.


> Then write it in languages that have debuggers, instead of XSLT.

Up until a few years ago, I could debug basic stuff in FireFox. If Firefox encountered an XSLT parsing error, it would show an error page with a big ASCII arrow pointing to the instruction that failed. That was a useful clue. Now it shows a blank page, which is not useful at all.


Naturally I meant as a developer. I don’t doubt I came past xslt rendered pages.


If you view an RSS or Atom feed in chrome today you just get a screen of xml eg. https://developer.wordpress.org/news/feed/

In the golden old days of 2018, browsers at least applied some styling https://evertpot.com/firefox-rss/

You can still manually apply styling using xslt https://www.cedricbonhomme.org/blog/index.xml


In 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.


The 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.


> 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


But 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.ph...


> nothing is truly lost.

XSLT does much more than CSS.


Technically 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.


For RSS feeds, XSLT stylesheets are used to display a human-readable version in the browser.

Random example: 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.


Why is this so critical? We dont due this for any other format. If you put an ms office document on a page, we dont have the browser render it, we download it and pass it off to a dedicated program. Why is RSS so special here?


Because we want RSS to be friendly to new users. If you display a RSS feed as a wall of XML text, no new user will understand. If you just make it so clicking a RSS link brings up a blurb about RSS is & links on how to use, they might understand.

And we have done it for other formats: PDF is now quite well supported in browsers without plugins/etc.


An RSS feed is not a document meant for viewing. It's not like PDF or HTML or a video.

It's a format intended for be consumed like an API call. It's like JSON. The link is something you import into an aggregator.

RSS feeds shouldn't even be displayed as XML at all. They should just be download links that open in an aggregator application. The same way .torrent files are imported into a torrenting client, not viewed.


Well, I do agree with you, but...

1. This is pretty difficult for someone who doesn't know about RSS. How would they ever learn what to do with it?

2. Browsers don't do that. There used to be an icon in the URL bar when they detected an RSS feed. It would be wonderful if browsers did support doing exactly what you suggest. I'm not holding my breath.

I'm not looking to replicate my blog via XSLT of the RSS feed: that's what the blog's HTML pages are. I just don't want to alienate non-RSS users.


People learn what to do with RSS the same as with anything else. They look it up or someone tells them. It's not like a .psd file tells you what it is, if you don't have Photoshop installed.

I don't think you need to worry about "alienating" non-RSS users. If somebody clicks on an RSS link without knowing what RSS is and sees gibberish, that's not really on you. They can just look it up. Or if you want, you can put a little question-mark icon next to the RSS link if you want to educate people. But mostly, for feeds and social media links, people just ignore the icons/acronyms they don't recognize.


Because the "semantic web" was an interesting idea.

And: Because it exists/existed and thus people relied upon it.

With the amount of sites on the web, even a small number relying on features, each having just a bunch of users, it becomes a big number of impacted.


I dont see how xslt is connected to semantic web


"Semantic" means making all distinctions you care about and not making any distinctions you do not care about. This means a custom notation for nearly every case. XML is such a tool. And XSLT is a key component to make all these notations compatible with each other.


That is not what "semantic web" means. Semantic web was a series of standards (rdf and friends) made by w3c from the early 2000s that didnt really catch on.


JSON-LD, ActivityPub, and scholarly metadata are all examples of Semantic Web technology that have caught on.


The GP asked "Why is RSS so special here?"

And XSLT in that context is interesting as one can ship the RSS file, the web browser renders it with XSLT to human readable and a smart browser can do smart things with it. All from the same file.


Ok but maintaining a web browser that supports a ton of small features that nobody-except-me-and-my-cousin are using has a huge cost; you don’t support obscure features just because someone somewhere is relying on it (relevant: https://xkcd.com/1172/).


Why would Google keep supporting AMP if the line is drawn only by use?

They chose to kill off a spec and have it removed from every browser because they don't like it. They choose to keep maintaining AMP because its their pet project and spec. Its as simple as that, it has nothing to do with limited resources forcing them to trim features rather than maintain or improve them.


If you think about it, basically nothing except HTML is a critical function of browsers. You can solve everything just with that. We don’t even need CSS, or any custom styling at all. JavaScript is absolutely not necessary.


Yes and no.

You can have a document without CSS but you can’t style it.

You can have a document without JavaScript but only a static one (still interactive, but only though forms)

On the other hand, you can replace XSLT with server side rendering, or JavaScript. It does not serve a truly unique function.


> You can have a document without CSS but you can’t style it.

What? CSS didn't come around until several years after HTML did. And you can certainly style an HTML document without CSS.

> On the other hand, you can replace XSLT with server side rendering, or JavaScript.

You can also execute JavaScript on the server to make browsers more secure, but I don't see browser makers clamoring to remove JavaScript support.

> It does not serve a truly unique function.

It does, though. It lets someone do some basic programming of some web pages without having to become a developer


Inline styles came and went and were replaced by CSS. (style attribute is still just CSS). font, color, and others are no longer in HTML5 spec.

> You can also execute JavaScript on the server to make browsers more secure, but I don't see browser makers clamoring to remove JavaScript support.

JS is not there just for client side static DOM rendering. Something like Google Maps or an IRC chat would be a much poorer experience without it.


> font, color, and others are no longer in HTML5 spec.

Sometimes browsers are asked to render HTML documents that were written decades ago to conform to older specs and are still on the internet. That still works

> JS is not there just for client side static DOM rendering. Something like Google Maps or an IRC chat would be a much poorer experience without it.

Of course they would. That's most of the point. You can do a lot more damage with JavaScript than you currently can with XSLT, but XSLT has to go because of 'security concerns'


Well, IMO it would be cool if we could do that, but the MS Office formats are a lot more complicated so it's a lot more work to implement. Also, quite often the whole point of sharing a file in MS Office format is so that the user can take it and edit it, which would require a dedicated program anyway.


I don't think it's a critical feature, but it is nice-to-have.

Imagine if you opened a direct link to a JPEG image and instead of the browser rendering it, you'd have to save it and open it in Photoshop locally. Wouldn't that be inconvenient?

Many browsers do support opening web-adjacent documents directly because it's convenient for users. Maybe not Microsoft Word documents, but PDF files are commonly supported.


Yeah, but browsers actually make use of that format. And its not like you can add a special header to jpg files to do custom reformatting of the jpeg via a turing complete language. Browsers just display the file.


You can do the same by checking Accept headers, User-Agent if you truly must.


Aren'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?


You 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.


How 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.


Not without servers rendering the HTML or depending on client-side JS for parsing and rendering the content.

Its also worth noting that the latest XSLT spec actually supports JSON as well. Had browsers decided to implement that spec rather than remove support all together you'd be able to render JSON content to HTML entirely client-side without JS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: