James M Snell
jasnell at gmail.com
Fri Dec 1 09:53:36 PST 2006
Kyle Marvin wrote:
> I expect that if you associated a 'rel' value with links that point to
> "application/atom+xml", whether it is expected to be a feed or an entry
> would probably be part of the 'rel' description and thus not ambiguous
> at all. I think the discussion started because of the aforementioned
> issues with the HTML5 link semantics, which is what should probably be
<link rel="alternate" type="application/atom+xml" href="feed.xml" />
<link rel="alternate" type="application/atom+xml" href="archive.xml" />
<link rel="alternate" type="application/atom+xml" href="entry.xml" />
What is the purpose of using alternate links? What is a UA supposed to
do with 'em? Why did I as a content publisher choose to use the
"alternate" link relation? Are all of these links of equal value to all
UA's? Are they all expected to be processed in the same basic way?
Should an "archive" feed be treated the same way as a "subscription" feed?
Consider this use case:
In IBM's Activities implementation, each of our "Activity" collections
are entries in a top level master collection. Every "Activity" has
several representations: An Atom entry, An Atom feed, A RSS feed, A HTML
page, etc. On the html page I want to be able to link to each of the
various representations as alternates. I also want folks to be able to
subscribe to the Atom feed and allow the folks who are building
APP-enabled editing tools to autodiscover the edit uri of the entry. I
don't want UIs to show a subscription link to the Atom entry representation.
What I want is something like this:
<link rel="alternate subscribe"
<link rel="alternate edit"
<link rel="alternate subsribe"
Given these links I have all of the information I need:
* There are three alternate representations: An Atom Entry, An Atom
Feed and an RSS Feed.
* There are two links I can subscribe to: An Atom Feed and an RSS Feed
* There is one edit link
Note that this clearly separates the purpose of the link (rel) from the
resource type. I don't care what the value of the type attribute is, if
rel includes the keyword "subscribe" (or "feed", doesn't matter) then I
know I can subscribe to that resource. If the rel contains the keyword
"alternate" I know it's an alternate representation, no other semantics
are implied. Each of the keywords in the rel attribute are completely
orthogonal to one another.
Note also that there is a clear separation between the Atom Feed and
Entry types. These are different document types intended for different
audiences and deserve different media types.
More information about the whatwg