Thursday, February 09, 2006
Feed discovery extension
Feeds available on a site is currently discovered by feed readers by looking at link rel="alternate" tag, which is present on the page:
<link rel="alternate" type="application/rss+xml"
title="MySiteMainFeed" href="http://localhost.com/main.xml" />
The difficulty with this is, you have to specify link rel="alternate" for each of the feed available on the site. To simplify this we can have link rel="alternate" type="application/feedlist+xml" on the page which provides list of available feeds on your site.
Example:
<link rel="alternate" type="application/feedlist+xml"
title="MySiteMainFeed" href="http://localhost.com/feedlist.xml" />
feedlist.xml will be:
<?xml version="1.0"?>
<feedlist>
<link rel="alternate" title="RSS Content" type="application/rss+xml"
href="http://localhost.com/rss_feed.xml"/>
<link rel="alternate" title="Atom Content" type="application/atom+xml"
href="http://localhost.com/atom_feed.xml"/>
<link rel="alternate" title="Comment" type="application/rss+xml"
href="http://localhost.com/comment_rss_feed.xml"/>
</feedlist>
<link rel="alternate" type="application/rss+xml"
title="MySiteMainFeed" href="http://localhost.com/main.xml" />
The difficulty with this is, you have to specify link rel="alternate" for each of the feed available on the site. To simplify this we can have link rel="alternate" type="application/feedlist+xml" on the page which provides list of available feeds on your site.
Example:
<link rel="alternate" type="application/feedlist+xml"
title="MySiteMainFeed" href="http://localhost.com/feedlist.xml" />
feedlist.xml will be:
<?xml version="1.0"?>
<feedlist>
<link rel="alternate" title="RSS Content" type="application/rss+xml"
href="http://localhost.com/rss_feed.xml"/>
<link rel="alternate" title="Atom Content" type="application/atom+xml"
href="http://localhost.com/atom_feed.xml"/>
<link rel="alternate" title="Comment" type="application/rss+xml"
href="http://localhost.com/comment_rss_feed.xml"/>
</feedlist>