theriom.com
This blog is mainly for me, a way of remembering things I've done; when I couldn't find an answer on Google, I wrote about it here. Hopefully, other people may find it helpful too.
Simple xsl for eztz rss format

Below is a simple xsl that accepts the xml from an eztv.rss type stream and converts this stream into a flatter structure for handling by scripting languages, such as bash etc. Currently the xsl only exports the url, and the file name, but could be altered to export more data.

<?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet version="1.0"  
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:a="http://xmlns.ezrss.it/0.1/"
      xmlns:b="http://xmlns.bt-chat.com/0.1/" >
      <xsl:output indent="no" method="text" encoding="UTF-8"/>
      <xsl:template match="/">
           <xsl:for-each select="/rss/channel/item">
                <xsl:value-of select="link"/><xsl:text> </xsl:text><xsl:value-of select="a:torrent/a:fileName"/><xsl:value-of select="b:torrent/b:fileName"/><xsl:text>&#10;</xsl:text>
           </xsl:for-each>
      </xsl:template>
</xsl:stylesheet>

Last modified on 2012-06-18