Subject: self and alternate links for entries

From: Bill de hOra <[email-masked]>
Date: Tue, 30 Jan 2007 12:58:44 +0000

Hi,

I'm building a tool (for Plone) at the moment that will publish any 
content as an Atom Entry by appending '/entry.xml' onto the URL. I had a 
question about declaring self and alternate links. Here are two options:

1:

@rel=self,@type=application/xml+atom links to the Entry

@rel=alternate, @hreflang, @type, links to the Content

2:

@rel=self @hreflang, @type, links to the Content

@rel=alternate, @type=application/xml+atom links to the Entry

I couldn't find enough information in the RFC about which way to go. 
Which would you choose, and why?

cheers
Bill

---

From: "Thomas Broyer" <[email-masked]>
Date: Tue, 30 Jan 2007 14:42:04 +0100

> Which would you choose, and why?

#1, because:

a. I understand "self" as "myself"

b. rel="self" was initially added –even though that does not appear in
the spec– so that feed readers do not have to know the IRI where the
feed was downloaded, they can just read a byte-stream and the
feed-level <link rel="self" .../> will tell them that IRI. For
entry-level such links, I would expect the same: where could I
download this "file" when nobody gave me its IRI?

-- 
Thomas Broyer

---

From: "A. Pagaltzis" <[email-masked]>
Date: Tue, 30 Jan 2007 17:59:08 +0100

* Bill de hOra <[email-masked]> [2007-01-30 14:20]:
> I couldn't find enough information in the RFC about which way
> to go. Which would you choose, and why?

The “self” relation means “this same Atom Document you’re just
looking at.” The “alternate” relation means “another
representation of the same resource that this Atom Document
represents.”

Which option is correct should be pretty clear from that.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>