Subject: Current and permalink link rel values

From: Elliotte Harold <[email-masked]>
Date: Fri, 23 Feb 2007 08:16:43 -0500

I'd like to add multiple links to my feed for both the current version 
of the story and the permalink. E.g.

  <entry>
     <title>Matt Mullenweg has released Wordpress 2.1.1 and 2.0.9.
           </title>
     <content type="xhtml">
       <div xmlns="http://www.w3.org/1999/xhtml" 
id="February_22_2007_30633" class="2007-02-22T09:31:33Z">
<p>
Matt Mullenweg has released <a 
href="http://wordpress.org/development/2007/02/new-releases/">Wordpress 
2.1.1</a> and 2.0.9.
</p>

</div>
     </content>
     <link href="http://www.cafeconleche.org/#February_22_2007_30633"/>
     <link rel="permalink" 
href="http://www.cafeconleche.org/oldnews/news2007February22.html#February_22_2007_30633"/>
     <id>http://www.cafeconleche.org/#February_22_2007_30633</id>
     <updated>2007-02-22T09:31:33Z</updated>
   </entry>

In particular is "rel='permalink'" a reasonable way to do this? Might it 
make sense to register current and permalink values for the rel 
attribute in the IANA Registry of Link Relations? Or something like them?

By the way, http://www.iana.org/assignments/relation/ is 404. This is 
referenced in the Atom 1.0 spec. It doesn't really need to be resolved, 
but it would be nice to put something there.

-- 
Elliotte Rusty Harold  [email-masked]
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Fri, 23 Feb 2007 15:18:20 +0100

>but it would be nice to put something there.

Interesting. http://www.iana.org/assignments/link-relations.html is the
right address at the moment.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Antone Roundy <[email-masked]>
Date: Fri, 23 Feb 2007 08:34:13 -0600

On Feb 23, 2007, at 7:16 AM, Elliotte Harold wrote:
> I'd like to add multiple links to my feed for both the current  
> version of the story and the permalink. E.g.
...
>     <link rel="permalink" href="http://www.cafeconleche.org/oldnews/ 
> news2007February22.html#February_22_2007_30633"/>

Both of those would probably be best described as "alternate" links.   
The second one in particular is what "alternate" was intended to be  
used for.  However, RFC 4287 contains the following:

    o  atom:entry elements MUST NOT contain more than one atom:link
       element with a rel attribute value of "alternate" that has the
       same combination of type and hreflang attribute values.

So you couldn't keep both as "alternate" links.  In my opinion, you  
should use the second one (the longer lasting one) only, and omit the  
first (which is going to become invalid as soon as the entry falls  
off the page anyway -- anyone who used it to get to your page and  
bookmarked it, and anyone who follows it from a cached copy of your  
feed isn't going to be able to find the entry without a lot of  
needless digging through your archives). You should have a link to  
http://www.cafeconleche.org/ at the feed level.  While that won't  
link directly to that entry, it'll get people to it as long as it's  
on that page.

---

From: Elliotte Harold <[email-masked]>
Date: Fri, 23 Feb 2007 10:16:33 -0500

Antone Roundy wrote:

> The second one in particular is what "alternate" was intended to be used 
> for.  However, RFC 4287 contains the following:
> 

Furthermore, a link element with no explicit rel attribute is assumed to 
be an alternate link, though I think this counts against the maximum of 
1 given above.

Consequently I suspect (though have not yet tested) that at least some 
feed readers pick the alternate link as the default when there's more 
than one. I suspect others pick the first in document order.

Does anyone know how feed readers actually do choose among multiple 
possible links in an entry?

---

From: James M Snell <[email-masked]>
Date: Fri, 23 Feb 2007 07:22:07 -0800

+1.

Antone Roundy wrote:
> [snip]
> first (which is going to become invalid as soon as the entry falls off
> the page anyway -- anyone who used it to get to your page and bookmarked
> it, and anyone who follows it from a cached copy of your feed isn't
> going to be able to find the entry without a lot of needless digging
> through your archives). You should have a link to
> http://www.cafeconleche.org/ at the feed level.  While that won't link
> directly to that entry, it'll get people to it as long as it's on that
> page.
> 
>

---

From: James M Snell <[email-masked]>
Date: Fri, 23 Feb 2007 07:43:05 -0800

Last I had checked (last spring) it was a mess.  Some readers picked the
first alternate link in the document; some readers picked the last
alternate link in the document; some readers picked the first link in
the document regardless of it's rel value; some readers picked the last
link in the document regardless of rel value; one reader would even
completely ignore atom:source elements in the entry and would choose
links from that depending on where the atom:source was placed in the
entry.  Hopefully it's gotten better since but I don't know for sure.

- James

---

From: "A. Pagaltzis" <[email-masked]>
Date: Fri, 23 Feb 2007 16:58:40 +0100

* Elliotte Harold <[email-masked]> [2007-02-23 15:15]:
> In particular is "rel='permalink'" a reasonable way to do this?

It should be `rel="alternate"`.

> Might it make sense to register current and permalink values
> for the rel attribute in the IANA Registry of Link Relations?

What’s the purpose of the `current` link? Is there ever a case
where it would be bad to send the reader to the permanent
location of the item?

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

---

From: Paul Hoffman <[email-masked]>
Date: Fri, 23 Feb 2007 10:35:27 -0800

At 8:16 AM -0500 2/23/07, Elliotte Harold wrote:
>By the way, http://www.iana.org/assignments/relation/ is 404. This 
>is referenced in the Atom 1.0 spec. It doesn't really need to be 
>resolved, but it would be nice to put something there.

It doesn't need to be resolved at all. Given the technical abilities 
of IANA, putting "something" there (or at 
<http://www.iana.org/assignments/relation/self> and so on) is 
probably worse than a definitive 404.

---

From: "Edward O'Connor" <[email-masked]>
Date: Fri, 23 Feb 2007 14:35:12 -0500

>> referenced in the Atom 1.0 spec. It doesn't really need to be
> <http://www.iana.org/assignments/relation/self> and so on) is probably
> worse than a definitive 404.

Note that http://www.iana.org/assignments/link-relations/{relation}
resolves to documentation for relations current, first, last, next,
payment, and previous.

Ted

-- 
Edward O'Connor
[email-masked]

Ense petit placidam sub libertate quietem.

---

From: Elliotte Harold <[email-masked]>
Date: Fri, 23 Feb 2007 14:41:55 -0500

> where it would be bad to send the reader to the permanent

Yes, for some definitions of "bad". First of all many sites want to 
direct a user to the main page, and then have them click through to the 
full article (more space to show ads, more hits).

Secondly, the permalink URLs don't necessarily exist (yet). The main 
URLs do.