Copia gets RSS 1.0, courtesy XSLT

I added RSS 1.0 feeds to Copia yesterday. It was a fun Sunday evening hack project, and even though parts of PyBlosxom still make me scratch my head, I'm in even more awe of its hackability.

It seems RSS 1.0 has always been a sketchy area for PyBlosxom. Because RSS 1.0 essentially needs 2 modes, the item list and the item details, you can't emit it linearly, and so you can't use a PyBlosxom flavor, as with RSS 0.91 or atom. I found some discussion of an RSS 1.0 from time to time in the archives, including this Perl port, but nothing readily usable, so I had to roll my own.

But what does an XML head do when faced with such a task? He runs a simple equation: existing atom flavor for PyBlosxom + plenty of Atom to RSS 1.0 XSLT transforms out there = decision to implement an XsltRenderer for PyBlosxom. The XsltRenderer can take a flavor's output and run it through an XSLT to produce the final output.

More on that in a follow-up item, but for now, I've added the whole site feed to the feed discovery convention in the HTML headers, and also to the right hand listing. There are also topic-specific feeds for all keywords.

So, for example, here is the RSS 1.0 Python feed, and here is the XML Atom feed. Note: we use lowercase for keywords on Copia.

[Uche Ogbuji]

via Copia
6 responses
There is a plugin to output RSS 2.0, it's at http://pyblosxom.sourceforge.net/blog/registry/syndication/rss2renderer . I planned to modify it to output keyword-specific feeds; how did you do it?
I found rss2renderer, but I'm an RDF kind of person, so RSS 2.0 was never going to cut it for me.  I'll mention that IIRC Micah Dubinko mentioned that he was needing to hack rss2renderer.py.  He didn't quite mention what needed hacking.



As for the topics, it has to do with the way I implemented the XsltRenderer (more on this very soon).  It leaves all the basic work to the normal renderer, so all the keyword specifics get normally processed.  In the case of my RSS 1.0 feed, I'm just using the regular atom flavor for the keyword view.  The output then gets feed into atom2rss.xslt, and voila! RSS 1.0.



From what I remember of rss2renderer.py, things won't be so easy in that case because it replaces BlosxomRenderer rather than chaining from it.
A tangential request: the Atom feed currently lists "Uche and Chimezie Ogbuji" as the author on all entries, and instead, you are using categories to differentiate authors. Unfortunately, no categories show up in the feed, and thus I can never tell who wrote what. Is at least either of these issues fixable?
Aristotle, I fixed that (trivial edit of the atom flavor template).  Thanks.  I hadn't even noticed the confusion in the author/name field.



I'll also look into topics for the feed, but I suspect it will be easier to add them to the RSS 1.0 feed rather than the Atom feed, because in the former case I can use XSLT to convert the list of topics into the right elements for Atom (I get them from the keywords plug-in as XHTML a elements).
Cool, thanks!
In case someone is interested, I've written stylesheets to convert Atom 1.0 to RSS2.0: http://atom.geekhood.net