Free Newsletters
Technology & Business Daily

InfoWorld
Log-in | Register

  Friday, September 06, 2002 

Experimenting with RSS 2.0

Assuming the RSS core is now frozen, Sam Ruby pointed out that version 2.0 makes the <fullitem> element in my feed bogus, and suggested I move it into the mod_content module, one of a series of modules designed for RSS 1.0. Good idea! Along with Rael Dornfest and others, I've always liked the idea of "RSS 0.9x-style simple XML syntax with room for expansion"[1].

I was already using the alternate RSS writer callback mechanism, which Dave Winer provided a while ago, in order to override the default RSS writer and insert <fullitem>, an element containing the complete text of each blog item. This was a hack that has enabled me to maintain two feeds. In the first, the bogus <fullitem> was ignored by aggregators, but was transformed (by XSLT) into the <description> in the second feed. Meanwhile, back in the first feed, the <description> is truncated to just its first paragraph. That's done by means of another callback mechanism Dave added so those of us who write longer items needn't overwhelm those who read them in RSS aggregators.

The alternate RSS writer is a script I call myRssWriter, which lives in the table called user.radio.callbacks.writeRssFile. It is a wholesale replacement for the standard RSS writer, system.verbs.builtins.radio.weblog.writeRssFile. Originally I just cloned that script and made a few tweaks. Here were the additional tweaks I made tonight to create what will hopefully be a kosher 2.0 feed.

First, I changed this:

add ("<rss version=\"0.92\">");

to this:

add ("<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" >");

I'm actually invoking two modules here: the content module for my fullitem element, and the Dublin Core module for the date.

Then, I changed from:

add("<pubDate>" + date.netStandardString(adrpost^.when) + "</pubDate>");
add("<fullitem>" + fullitem + "</fullitem>");

to:

add("<dc:date>" + date.netStandardString(adrpost^.when) + "</dc:date>");
add("<content:encoded>" + fullitem + "</content:encoded>");

The <dc:date> was, admittedly, gratuitous. I could have left <pubDate> alone, and in any case both are optional and not yet relied on by anyone so far as I know. But I've always liked the idea of Dubin Core metadata, so...onward!

Finally, there was an XSLT stylesheet to adjust. I use a transform of my default feed to produce my alternate long-descriptions feed. The stylesheet needed namespace declarations for <dc:> and <content:>.

Everything seems to check out. I unsubscribed and resubscribed my channels in Radio without any trouble. (Of course if any problems arise in other systems, please holler.) Should RSS readers ever start to care about <content:encoded> (or some equivalent), I can drop the second feed. In the best of all possible worlds, such readers would then offer users three choices based on the default feed:

  1. The full content of each item.

  2. The truncations suggested by the author of the feed.

  3. An alternate truncation performed on the full content by the RSS reader.

Meanwhile, both flavors are available as separate feeds that work with existing RSS readers.

 

Rael Dornfest reflects on the past, present, and future of RSS

Here are some of Rael's musings on the week's flurry of RSS discussion:

Do I wish we could go back to 0.91 and further, moving all those imperfect elements into namespaces? Why sure. Who wouldn't? But the sheer number of tools and applications that rely upon what's in there (for better or for worse) makes that impossible -- not without considerable breakage and retooling. Am I content to have that simply be optional water under the bridge? Sure thing.

That said, I am concerned to see last minute stuffing of the core with elements that have yet to prove their worth. Of course they're all optional again, but that's just so much more baggage (remember skipHours?) to carry around. When the idea has been put forth to go the route of XML-Namespaces, why clutter a room with boxes from the basement just before building a shelving unit. Would I like to see those elements pushed out into namespaces? Sure thing. More toothpaste out of the tube? No more than some of the fiddling with RSS autodiscovery in its first few days of existence. [raelity bytes]

It's great to see this discussion opening up. As I've mentioned to a few people this week, Google's first result for "mission of RSS" is eerie:

The truth is one but can have plural manifestations. This plurality need not be in conflict with one another; it can be cooperative and complementary. To understand, appreciate and realize the unity in a tremendous vortex of diversities, should be the humanity's goal of life.

How does Google do that?

 

 

CxO bloggers

I'm particularly interested in C[ETI]Os who are using blogs to communicate goals, strategies, and perspectives. So I've added a feature to this blog that helps keep track of these CxO bloggers.

This was also a chance to put Marc Barrot's excellent activeRenderer to work. Although his blog is called SLAM (for Site Logging and Monitoring), and is nominally about system administration, Marc has become deeply fascinated with outline processing and has built some great tools to extend Radio's outlining capabilities.

The "how this works" page, linked to from instances of activeRenderer, documents how to use it. Briefly, here's what I did:

1. Wrote the outline in Radio's outliner, where it's easy to maintain.

2. Saved it to the /radio/www/gems directory as cxoBlogs.opml, which in turn causes it to upstream to http://weblog.infoworld.com/udell/gems/cxoBlogs.opml.

3. Added the following to my homepage template:

   <p><%activeRendererHeader () %>
         <%activeRoll (
            "
http://weblog.infoworld.com/udell/gems/cxoBlogs.opml",
            title:CxO bloggers )%>
  </p>

Nice! Thanks, Marc! This is an ideal way to manage a chunk of structured data compactly and elegantly.

 


Recent Entries


















































Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist