It seems unlikely that Blogger is going to create native RSS any time
soon. In the mean time, we've now got 3 systems that can help Blogger users create
RSS. Although they have some general applicability as well, I see one of their
major targets to be pages directly created by Blogger. It would still be preferable
if the RSS was created natively but these systems may be able to solve the problem
in the mean time.
http://logicerror.com/blogifyYourPage
http://www.voidstar.com/rssify.php
http://www.kalsey.com/web/xml/rssblog.html
Now at the moment, these all use a single tag pair around an Item <span
class="rss:item"></span>. While this is simple for the Blogger user to implement in
the template, it forces quite a lot of work onto the Blog->RSS code to figure out
title, description, channel details and so on. The Logicerror implementation uses
some extra parameters for hints. The Kalsey implementation uses document <meta>
tags for some of this.
Now we've got 3 proofs of concept, this seems like a good time to try and come up
with a definitive approach. If we can get some agreement here, then between us we
could produce several implementations to work against it in several languages. Then
we could produce some straight forward docs to explain to a Blogger user how to
modify their template and what to do next. Finally, we can start evangelizing the
Blogger users to encourage them to use it.
To kick this off, here's some thoughts on what's required. This stuff has got to be
easy to implement so let's strive for simplicity.
- First off, let's break the problem in two.
Channel detail and Item detail.
Channel. There's a pretty good match between the required Channel information and
the Dublin Core. It doesn't change very often, so it can be hard coded into the
template. Some extra <meta> tags looks like a very good approach.
Item. As we all know the issue here is coming up with 3 pieces, Link, Title and
Description.
- Link. I favour using this for the URL of the archive page containing the item
text. It is common practice in Blogger to construct this from
<$BlogItemArchiveFileName$>#<$BlogItemNumber$> So if we put a marker into the
template, we should be able to construct this.
- Description. This should be pretty easy. We just need to mark the start and end
of <$BlogItemBody$> This is what we're doing right now with the Blog->RSS systems.
If we pick this up, encode the entities and strip the more aggressive (!) html
tags, it syndicates the main Blog content without losing any information, such as
the embedded links.
- Title. Blogger has no Title for items so we can either help the user to create
one, synthesize one, or just leave it out as per the 0.92 spec. I favour
synthesizing one from the first sentence or N chars of the description. People who
read the RSS can then use it or not as they feel like. Some Blogger users manually
create titles as part of the item body but I can't see an easy way of using this
information, and I don't want to force them to do this.
The entity encoding problem and the lack of title in Blogger means
that we have to use code. It would be great if Blogger could output mixed RSS and
HTML but it doesn't. Even if it could use two templates on one blog, there's no
scripting language in blogger to do this.
So, since code is required, this PHP/PERL/ASP/Python/Java/whatever has got to run
somewhere. Ideally this would run on the Blogger's site so they take the bandwidth
and processing hit. For people like BlogSpot users who don't have any CGI ability,
this will have to be hosted, but we should encourage lots of people to do this,
again to spread the bandwidth requirement around.
If we're running code anyway, then building some support into weblogs.com would be
possible. We'd just have to have a way of checking if the RSS had changed. Which
would mean having a way of storing some state. A one line text file with the 1st
<link> URL in it, would be enough.
So take that all together and we would have a Blogger template something like this.
<html>
<head>
<title>My Blog</title>
<meta description="foo" />
<meta Some_Channeldata="bar"/>
...
</head>
...
<Blogger>
<BlogDateHeader>
<$BlogDateHeaderDate$>
</BlogDateHeader>
<a name="<$BlogItemNumber$>"></a>
<span class="rss:item">
<span class="rss:description">
<$BlogItemBody$><br />
</span>
<span class="rss:link">
<a href="archive/<$BlogItemArchiveFileName$>#<$BlogItemNumber$>">[link]</a>
</span>
<br />
</span>
</Blogger>
...
</html>
The Blog won't look any different, but we have enough info to produce the RSS.