Home >  Archive >  2011 >  February >  24

Previous / Next

Microblogging namespace for RSS 2.0
By Dave Winer on Thursday, February 24, 2011 at 10:08 PM.

Background #

In the eight years it's been since RSS 2.0 was frozen we've seen a whole new kind of blogging come about, microblogging.  #

RSS is well-suited to represent microblog content, probably because the first blogs were much like Twitter -- with short title-less posts that often just link to one place.  #

Even so, there are some new bits of information that need to be transmitted by feeds, and there is no convenient way to represent them in RSS 2.0 without extending it.  #

While this namespace is designed to extend RSS 2.0, it can be used in any XML-based format that can be extended by namespaces. #

How to reference #

Link to it as an attribute of an element containing sub-elements that are in this namespace. For example, this is how you would link to it from the <rss> element: #

<rss version="2.0" xmlns:microblog="http://microblog.reallysimple.org/"> #

Elements in the namespace #

<microblog:linkFull> -- sub-element of <item>  #

It's the unshortened version of <link>.  #

<microblog:linkFull>http://nyu.edu/stories/very-long-name/</microblog:linkFull> #

Only include this elemement when <link> is a shortened url. #

<microblog:archive> -- sub-element of <channel> #

Links to the calendar-structured archive for the feed.  #

The folder pointed to by this address contains one folder for each year, 2009, 2010, 2011, etc. #

Each of those folders contains one folder for each month, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12. The month folders must be zero-padded to two places. Folders may be missing, indicating that there is no archived content for the month. #

Each of the month folders contains folders for the days of the month. Day folder names are also zero-padded to two places and may be missing if there were no updates on the given day.  #

Each day folder contains a file named rss.xml, unless the optional <filename> sub-element is supplied, which over-rides the default. This makes it possible for a single calendar structure to store the archive of more than one feed.  #

<microblog:archive> must contain at least two sub-elements: <link>, the address of the archive and <startDay>, a hyphen-delimited date, formatted as yyyy-mm-dd, for the first element of the archive.  #

It may contain two optional sub-elements: <endDay> which is the hyphen-delimited date (yyyy-mm-dd) for the last element in the archive; and <filename> as expained above. #

If <endDay> defaults to the pubDate of the feed, if it's specified. If not, it defaults to the current date. #

<microblog:readCount> -- sub-element of <item>  #

Says how many times the item has been read. Some systems have this information, we gather it in Radio2. Might as well have a way to transmit the info. #

<microblog:localTime> -- sub-element of <channel> #

Just a simple way for the editor of the site to see what time, in his or her time zone, the feed was last updated. Must-have for debugging. Useful if you have trouble converting GMT to local time in your head (as I do). #

Example: <microblog:localTime>3/15/2011; 10:34:54 AM</microblog:localTime> #

To-do #

Feed-is-finished and feed-has-moved #

I always wished RSS had a way to say that a feed had expired and you should unsub (stop polling) or the feed has moved to a new location.  #

Years ago this idea was proposed but shouted down because HTTP already has both these features. It does but.  #

1. Believe it or not RSS could be used outside of HTTP and  #

2. Much more important -- a lot of people who host feeds do not have the ability to reprogram the HTTP server their feeds are hosted on. For example, my feeds are hosted on Amazon S3, and I love it. But there's no ability for me to redirect.  #

3. If they weren't necessary why do people still post items in their feeds that say the feed moved. Likewise why do people keep polling for new comments on posts where comments have been closed?  #

So I'm going to add both features to the microblogging namespace. If you don't like em, don't use em. :-) #




Christmas Tree
This site contributes to the scripting.com community river.


© Copyright 1997-2011 Dave Winer. Last update: Tuesday, March 15, 2011 at 11:37 AM Eastern. Last build: 12/12/2011; 12:57:55 PM. "It's even worse than it appears."

RSS feed for Scripting News

Previous / Next