Ok, distilled from this conversation...

1. Comments can either be included directly within the feed or in a separate feed. 2. Comment entries are distinguished by a link @rel="in-reply-to" @href="{$original-entry/atom:id}" 3. Comment feeds may be indicated using a link @rel="comments" @href="{$comment-feed-url}" as a child of <feed />

Example 1: Entries and comments in a single feed

<feed>
 <entry>
   <id>http://example.com/2</id>
   <link rel="in-reply-to" href="http://example.com/1"; />
   ...
 </entry>
 <entry>
   <id>http://example.com/1</id>
   ...
 </entry>
</feed>

Example 2: Comments in a separate, associated feed

<feed>
 <link rel="comments" href="http://example.com/comments.xml"; />
 <entry>
   <id>http://example.com/1</id>
 </entry>
</feed>

<feed>
 <entry>
   <id>http://example.com/2</id>
   <link rel="in-reply-to" href="http://example.com/1"; />
   ...
 </entry>
</feed>

The in-reply-to link could also be used in feeds that are not directly associated with the source feed. e.g. if you post an entry in your blog and I post a reply to that entry in my blog. My entry can use the in-reply-to link so that thread aware readers can make the connection appropriately.

Question: could the @rel="comments" link be handled appropriately using the existing @rel="related"? The question hinges on whether or not it is semantically important to distinguish "comments" from other types of related entities. I'm not convinced it is. If a @link="related" points to an Atom feed, who cares what that feed contains, the user agent can make the feed available for the user to subscribe to pulling in the relevant entries.

- James

A. Pagaltzis wrote:

* James M Snell <[EMAIL PROTECTED]> [2005-07-12 21:55]:
What you describe is actually the way we currently integrate
comments into feeds in the internal IBM blogging
infrastructure:  Entries and Comments are integrated into a
single feed.

Great to know that there’s precedent for this as well as for the
scenario with a separate feed list (as I mention below).

Currently there is no way of associating (with metadata) a
comment to it's entry however.  The only connection is that the
title of the comment entry uses the "re:" naming scheme
commonly used for email replies. If we can come up with a way
of marking comment entries as comments and providing a
meaningful link back to the original entry, then this method
would definitely be workable.

As occured to me while replying to Antone Roudy, since atom:id
contains an URI and atom:link/@href must contain an URI, this
could simply be solved with a link included in comments:

   <entry>
       <link rel="in-reply-to" href="{$original-entry/atom:id}" />
<!-- ... --> </entry>

That seems to me to a very elegant solution to the issue that
requires minimal work on the Atom parser level to support and
keeps with the spirit of Atom. It’s “Atom-ish”, if you will (en
lieu of the “Perl-ish” that gets thrown around a lot where I come
from :-) ).

Another alternative would be to follow the model Sam Ruby uses in his blog. That is, produce a single feed for all comments (http://www.intertwingly.net/blog/comments.rss2).

This is actually very common already. I can think of a half dozen
weblogs from my subscription list off the top of my head which
offer such a comments feed.

The comments link could then be included on the feed level
rather than the entry level. A single comments feed for a
single main entries feed. The comments feed would include the
same mechanisms for associating the comment to the original
entry that we would use in the single feed solution.

Yep, exactly. The structure basically suggests itself.

As I said in the previous mail, it might also be worth specifying
a link relation for pointing to a feed with *both* entries and
comments where available, so that a thread-aware aggregator can
switch subscription over to it, only needing to poll a single
feed.

It is entirely possible to use a combination of these approaches.

Indeed.

I am liking this a lot.

Regards,

Reply via email to