Atom2RSS web service with Cocoon

I generally try to stay out of all the RSS/Atom/blahblah controversy, but this one was too easy to take care of with Cocoon:

Given this XSLT, it’s trivial to implement a web service to convert a URL from Atom to RSS (or vice versa, if that’s your thing):

<map:match pattern="atom2rss">
    <map:generate type="file" src="http://{request-param:url}"/>
    <map:transform src="stylesheets/atom2rss.xsl"/>
    <map:serialize type="xml"/>
</map:match>

Comments are closed.