Atom Torture Test
For somewhat inexplicable reasons, I got into a conversation about RSS feeds in general, and mine in particular, over at Sam’s blog.
As you might have noticed, I’ve deprecated several of my RSS 2.0 feeds, in favour of their Atom alternatives. There’s a reason for that. If you’ve subscribed to a full-content feed, it’s probably because you want to be able to read the content of my posts in your feedreader. That’s cool with me, but for a variety of reasons, those RSS 2.0 feeds will not display the content correctly. And there is really no way to fix them.
At least in principle, the Atom alternatives ought to be better. But are they?
Here are 4 areas where your RSS feedreader fell on the floor. Let’s see if its Atom support is any better. For the first one, there are already tests in the suite of Atom conformance tests. For the latter three, I wrote a little test feed of my own.
- Relative URLs: relative URLs in my posts (or in comments thereon) should have been interpreted as relative to the URL in the
<link> element of each <item>. Since such eventualities are not actually covered in the RSS 2.0 “Spec”, chances are those links were broken. Atom adds explicit support for xml:base. Does your feedreader actually implement it properly?
- XHTML: RSS 2.0 has no mechanism for telling your feedreader that the markup in the posts is anything other than tag-soup. In fact, without explicit extensions, like
<content:encoded>, it doesn’t even have a mechanism for telling the feedreader that it contains markup at all (the feedreader has to guess). Atom includes a type="xhtml" attribute which tells the feedreader that the content is actually XHTML. Does your feedreader pay attention, or does it just assume that everything anyone writes is tag-soup?
- MathML: if your feedreader recognizes the content is XHTML, and the rendering engine it uses is MathML-aware, then you might just be able to see the equations. (Thunderbird ought to fall into this class, as do, I am told, some Windows-based feedreaders when the MathPlayer Plugin is installed.)
- SVG: I use SVG for figures. No, I don’t include the SVG inline (thought that would make a nice torture-test). I include them using the
<object> element. Nested as the content of the <object> element is a GIF image, to be used as a fallback alternative.
<object type="image/svg+xml" data="http://golem.ph.utexas.edu/~distler/blog/svg/bhformation.svg">
<img src="http://golem.ph.utexas.edu/~distler/blog/svg/bhformation.gif" alt="..." />
</object>
Now, many feedreaders quite properly sanitize their inputs to eliminate hostile applets (loaded via the <object> element). I suppose I can forgive feedreader authors for stripping out all <object> elements, rather than trying to distinguish between potentially hostile ones, like applets, and obviously benign ones, like SVG files. But, either way, it is inexcusable to also strip out the fallback content of the <object> element. You should, at the very least, see the GIF image.
So how did your feedreader do? Did switching to Atom actually fix any of these issues for you?
Posted by distler at April 18, 2006 8:08 AM
TrackBack URL for this Entry: http://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/793
Re: Atom Torture Test
Care to create a ConformanceTest page on the Atom wiki, and seed it with a row or two of results? If you do, I’m sure that others will add additional rows and maintain it from there.
The hope behind capturing pointers to all such tests in one place is that eventually all actively maintained aggregators will converge on the correct behavior.
Re: Atom Torture Test
For some reason, Bloglines has a problem with the Atom feed…but it’s a minor one. Namely, there are no spaces in the feed before or after a link, e.g., “I wrote a littletest feedof my own.”
I’m not sure why this is happening…it’s very likely a Bloglines problem, but I don’t see it on other Atom feeds.
Re: Atom Torture Test
I tried your test with latest avaliable Safari, it didn’t show the SVG image (e.g. with Adobe SVG) or the GIF image, stripped the MathML markup out (leaving the contents of the tags), but the table test worked (text was a nice shade of black)
Re: Atom Torture Test
I’m the author of Shrook. I think your TBODY test is kind of bullshit - nitpicky and fantastically unimportant. That you have to go to such lengths to find holes in interpreting Atom shows how far we’ve come since RSS.
Re: Atom Torture Test
Nice tests. Some comments on how they’re interpreted by Snarfer…
For the first test we strip the style element (for security reasons) so although the text doesn’t show in green this has got nothing to do with xhtml support. I imagine you’ll find several other aggregators do the same thing - it’s not an uncommon practice.
In the second test, we display both sentences in bold. The fact that the uppercase B is still treated as bold is deliberate. I think it’s more likely that someone will accidently use the wrong case for bold markup as opposed to deliberately using an uppercase B that isn’t meant to be interpreted as bold. Not that this isn’t a valid test, but I don’t see it as something we would want to “fix”.
The MathML test we fail because (again for security reasons) we strip all markup that we don’t recognise or trust and MathML falls into the first category. It’s possible that we could add MathML elements to our white list, but even then it would still probably fail because we’re using Internet Explorer for our renderer. At some point we would like to offer support for the Mozilla renderer as an option, so this may be doable in the long term.
We semi-pass the last test in that we display the GIF image. The reason for not rendering the SVG natively is because (as mentioned before) we strip markup that we don’t trust and object tags definitely fall into that category. That behaviour is not likely to change anytime soon.
Read the post
Adding Atom support to PlanetPlanet
Weblog: Sam Ruby
Excerpt: This weekend’s recreational programming project involved PlanetPlanet and ensuring that there is adequate support for Atom. And there’s nothing like live data to help identify integration issues. It turns out that upgrading to the latest F
Tracked: April 23, 2006 8:33 PM
Read the post
Quality of Implementation
Weblog: franklinmint.fm
Excerpt: Reading Tim, Sam, and Jacques made me kind of irritated at first. None of that stuff is Really Simple. I...
Tracked: April 24, 2006 6:16 AM
Read the post
Re-syndicating vs sanitizing
Weblog: Sam Ruby
Excerpt: Just over a month ago, Tim Bray pointed both to Jacques' Atom Torture Test, and noted with apparent delight that NetNewsWire was able to tell him which entries he had already seen due to the fact that Planet made an effort to retain atom id’s. Un
Tracked: May 29, 2006 10:52 PM
Read the post
5 Years
Weblog: Musings
Excerpt: The honeymoon is definitely over.
Tracked: October 19, 2007 3:56 PM
Re: Atom Torture Test
Care to create a ConformanceTest page on the Atom wiki, and seed it with a row or two of results? If you do, I’m sure that others will add additional rows and maintain it from there.
The hope behind capturing pointers to all such tests in one place is that eventually all actively maintained aggregators will converge on the correct behavior.