The Sun BabelFish Blog
Don't panic !
How to create an RSS1.0 feed in Roller 3.1
Of the many feed formats, only two have long term viability: Atom and RSS 1.0. RSS1.0 is an rdf crystallization, which means that it is easy to parse using simple xml DOM and xslt tools and also very easy to extend. It is easy to extend because it is RDF, and so the interpretation of the extensions are given automatically by the rdf semantics. In the Atom world, understanding extensions always requires one to find the particular RFC for the extension (if there is one) and read it carefully. Machines cannot do very much with atom extensions, other than ignore them. RSS1.0 extensions on the other hand can be processed and partially understood by RDF tools, even if they never heard about them before.
Roller automatically creates Atom feeds now (I added mine a while back). Here is how to create an RSS1.0 feed in the latest version of Roller (which now supports tagging).
- Log in to your roller account
- Click on the Preferences Tab
- Click on Templates
- In the "Add a new template" entry box add a name such as rss10.xml (make sure your file name ends in xml, and click add.
- In the form add the following template
<?xml version="1.0" encoding='utf-8'?> <rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/"> #set($blg = $model.weblog) #set($items = $model.weblog.getRecentWeblogEntries("SemWeb", 25)) <channel rdf:about="$url.home"> <title>$utils.escapeXML($blg.name)</title> <link>$url.home</link> <description>$utils.escapeXML($blg.description)</description> <dc:date>$utils.formatIso8601Date($blg.lastModified)</dc:date> <admin:generatorAgent rdf:resource="http://rollerweblogger.org/"/> <items> <rdf:Seq> #foreach($item in $items) <rdf:li rdf:resource="$item.permalink"/> #end </rdf:Seq> </items> </channel> #foreach($item in $items) <item rdf:about="$item.permalink"> <title>$utils.removeHTML($item.title)</title> <link>$item.permalink</link> <dc:date>$utils.formatIso8601Date($item.updateTime)</dc:date> <dc:creator>$item.creator.fullName</dc:creator> <foaf:maker xmlns:foaf="http://xmlns.com/foaf/0.1/"> <foaf:Person rdf:about="http://bblfish.net/people/henry/card#me"> <foaf:name>$item.creator.fullName</foaf:name> </foaf:Person> </foaf:maker> #foreach ($cat in $item.categories) <dc:subject>$cat.name</dc:subject> #end #foreach ($tag in $item.tags) <dc:subject>$tag.name</dc:subject> #end #if( $utils.isNotEmpty($item.summary) ) <description>$utils.escapeXML($item.transformedSummary)</description> #end #if( $utils.isNotEmpty($item.text) ) <content:encoded>$utils.escapeXML($item.transformedText)</content:encoded> #end </item> #end </rdf:RDF> - adapt the above to your needs.
- The above feed only selects entries from the "SemWeb" category. If you would like to have all entries appear replace the
SemWebabove withnill - http://bblfish.net/people/henry/card#me is my web 2.0 name. If you have your own, make sure to replace mine with yours, otherwise remove the
rdf:about="..."attribute from the template.
- The above feed only selects entries from the "SemWeb" category. If you would like to have all entries appear replace the
- Your rss feed is now available at
http://blogs.sun.com/${blogname}/page/rss10.xml. Mine is available http://blogs.sun.com/bblfish/page/rss10.xml
Posted at 03:57PM Nov 06, 2006 [permalink/trackback] by Henry Story in SemWeb | Comments[1]
Note on comments:
- I know the forms below are a little small. We have asked for years for this to be changed, but I don't think it's going to happen soon. In Apple's Safari you can resize the entry box with you mouse. For people using other browsers click on this javascript link, that should allow you to resize your form.
- Comments are moderated, so they will take a little time to appear. Currently moderation means I have to read them personally. Hopefully with OpenId deployment, this will become more automated.
- HTML markup no longer works here, due to some decision made somewhere. Sorry about that.
- If you are having trouble posting, it may be that you need javascript to be enabled. I don't think javascript should be needed for submitting a form, but that's the way it is here.
- Check your comments by using the preview button...

Posted by Blogging Roller on November 07, 2006 at 02:47 AM CET #