Create a gist now

Instantly share code, notes, and snippets.

anonymous /simileRdf2rss.xsl
Created Jan 14, 2011

What would you like to do?
Simile RDF to RSS Conversion
<?xml version="1.0" encoding="UTF-8"?>
This is a quick and dirty conversion template to go from RDF (as produced
by a Simile Timeline) to RSS (to be ingested by Dipity). For more information
<xsl:stylesheet xmlns:xsl="" version="2.0"
<xsl:output indent="yes"/>
<xsl:template match="/">
<rss version="2.0"
<title>CMST-706 Collaborative Timeline on Wikileaks</title>
<pubDate><xsl:value-of select="format-date(current-date(),'[FNn,*-3], [D] [MNn] [Y] 0:01:01','en', (), ())"/></pubDate>
<xsl:for-each select="rdf:RDF/rdf:Description">
<xsl:variable name="date"><xsl:value-of select="a:start"/></xsl:variable>
<title><xsl:value-of select="a:label"/></title>
<xsl:if test="a:image!=''">
&lt;img src="<xsl:value-of select="a:image"/>" alt="<xsl:value-of select="a:label"/>" /&gt;
<xsl:value-of select="a:description"/>
<pubDate><xsl:value-of select="format-date(xs:date($date),'[FNn,*-3], [D] [MNn] [Y] 0:01:01', 'en', (), ())"/></pubDate>
<category><xsl:value-of select="eventType"/></category>
<dc:creator><xsl:value-of select="a:initials"/></dc:creator>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment