Peter Krantz wrote:
<entry>
<id>tag:example.com,2009:1</id>
<updated>2009-05-13T18:30:02Z</updated>
<published>2009-05-13T18:30:02Z</published>
<title>A title</title>
<summary>A summary</summary>
<content src="/docs/example.pdf" type="application/pdf" />
</entry>
It would be nice if the same feeds could be used in popular
feedreaders too. I have tried feeds with entries like the one above in
IE8, Firefox 3.5b4, Google Reader and Safari 4 but none of them make
it possible to access the PDF specified in the atom:content element.
Is this a misunderstanding on my part or is it just a rare enough
example that hasn't been implemented in client software?
I believe that this is valid, but in practice your average feed reader
only implements the featureset of RSS, ignoring the more esoteric
features of Atom. This is often because the parsing code started off as
an RSS parser and had Atom bolted on, so there was no room in the API
for some of Atom's unique features.
In practice, you're probably better off with something like the following:
<entry>
<id>tag:example.com,2009:1</id>
<updated>2009-05-13T18:30:02Z</updated>
<published>2009-05-13T18:30:02Z</published>
<title>A title</title>
<summary>A summary</summary>
<content>
<a href="/docs/example.pdf">Download PDF</a>
</content>
<link rel="enclosure"
href="/docs/example.pdf"
type="application/pdf" />
</entry>
The link in the content will provide an access method for the most basic
clients and the enclosure may provide additional functionality such as
automatic download for clients with support for enclosures.