What feeds should Firefox discover?

While wishing yet again that there was some better place to discuss what Firefox’s feed autodiscovery should find, I remembered: I’ve got a blog!

The two things that are correct, rel="alternate" with either type="application/rss+xml" or type="application/atom+xml" are the easy part. Other than having used .match when I meant .test, the patch I abandoned last fall seems to cover them exactly to spec. I burn with the desire to shove it through, shouting down any objections, but I know what Mark Pilgrim would call me as a result.

Then there’s all the exceptions.

WordPress defaults to having three feeds, full-content RSS and full-content Atom with to-spec links, and an RSS 0.92 feed with just a summary, perfect for our titles-and-links-only aggregator, that’s linked with <link rel="alternate" type="text/xml" title="RSS .92" href="/feed/rss/" />. Also, there’s all the people who believe they shouldn’t be using the unregistered and probably unregisterable type application/rss+xml, who may be using text/xml or the more sensible application/xml. With application/rss+xml refering to at least 9 different and incompatible formats, with two different root elements, two different namespaces plus a load of unnamespaced elements with shifting meaning and content models, good luck getting it registered, and although the HTML DTD isn’t able to express the restriction, so the validator won’t catch it, the spec makes it quite clear that type can only be either a registered mime-type, or an experimental type using the proper application/x-rss format. People using application/xml are wrong relative to a spec which only exists as a weblog post, but they are right relative to the HTML spec.

Then, for a short while last December while the literalists held sway, the feeds on mozilla.org’s home page were using type="application/rdf+xml" for RSS 1.0 feeds, and since they don’t use “RSS” in the title, even our current ultra-liberal autodiscovery wasn’t finding them. While they no longer use it, Ian Davis does, and there are surely others who do as well. There’s no spec for it, and I’ve yet to hear any persuasive ideas about how we should tell alternates in application/rdf+xml which are RSS from all the other possible RDF alternates. Mandating the string “RSS” in the title attribute is the only real suggestion I’ve heard, which makes that one specless (and likely to remain specless other than perhaps another blog-post-as-spec, given RSS-DEV‘s moribund state) form of autodiscovery utterly unlike the other two, which explicitly say the title isn’t significant (Atom), or that it may be anything and is thus not significant (RSS).

There is precedent for overloading title with machine-significant things: that’s how preferred and alternate stylesheets work, and also how FOAF autodiscovery works. However, neither one is a good analogy.

For stylesheets, there’s just the one place to look: anyone putting a link in their HTML to refer to their stylesheets knows that the explanation for how that link will work can be found in the HTML spec. For RDF, even if an autodiscovery spec is published as part of the RSS 1.0 spec, there’s no reason to think that anyone doing alternate RDF that isn’t RSS would first check the RSS 1.0 spec, to see what letters they are and aren’t allowed to use in their title.

For FOAF, the penalty for being wrong is completely different. If you link to some random non-FOAF RDF with type="application/rdf+xml" and a FOAF scutter happens to try to read it, no harm done: it’s RDF, being read by an RDF parser, and if it doesn’t find any FOAF statements, well, it won’t be loading it all that often. However, if you structure RSS autodiscovery so that anything of type="application/rdf+xml" may be read by RSS parsers, you’ve got a very big problem. Nearly all of them are not RDF parsers, so they’ll have absolutely no idea what you are saying if you aren’t saying it in RSS 1.0’s restricted syntax and grammar, but that’s not going to stop them. They’ll keep reading it, and reading it, and reading it once an hour, until the internet shuts down or the user switches to a new reader that doesn’t import subscriptions unless it can read them right away.

Far and away the most likely outcome of saying that autodiscovery for RSS 1.0 should use <link rel="alternate" type="application/rdf+xml" title=".* RSS .*" href="/foo" /> is that it will prevent the use of link for any other alternate RDF of any sort, which isn’t something I want to be a part of doing.

So, what do you think? Beyond the two correct, to-spec sorts, what should Firefox autodiscover?


Comment by Roger Benningfield #
2005-04-15 23:52:20

When I do autodiscovery, I look for application/rdf+xml, and then do a basic XPath query to see if whatever I’m discovering looks like a feed. Is there any reason that Firefox couldn’t do the same thing?

Comment by Phil Ringnalda #
2005-04-16 00:05:15