<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0">

  <xsl:output method="html" /> 		 
  
  <xsl:variable name="title" select="/rss/channel/title"/>			
  <xsl:template match="/">
    
    <html>
      <head>
        <title>
          <xsl:value-of select="$title"/> RSS Feed</title>
          
          <link rel="stylesheet" href="/cms/css/rss.css" type="text/css"/>

        </head>			
        <xsl:apply-templates select="rss/channel"/>				
      </html>
    </xsl:template>

    
    <xsl:template match="channel">
      <body>
        <h2>
          <xsl:value-of select="title" />
        </h2>

        <div class="main">

          <p>This is an RSS feed from the <a href="{ link }"><xsl:value-of select="title" /></a> website.</p>

          <xsl:apply-templates select="item"/>      

        </div>

        <div class="sidebar">

          <h3>What is an RSS feed?</h3>

          <p>An RSS feed allows you to be notified when a website is updated, rather than having to personally visit the site.</p>
          
          <p>You tell a <em>News Reader</em> which RSS feeds you are interested in by <em>subscribing</em> and the News Reader will check regularly for updates</p>

          <h3>Subscribe to this feed</h3>
          
          <p>To subscribe to this RSS feed:</p>
          
          <ul>
            <li>Drag the orange XML button into your News Reader: <a href="." title="Subscribe to { title }"><img src="http://www.feedburner.com/fb/images/pub/xml_button.gif" alt="XML button" style="border:0"/></a></li>
            <li>Cut and paste the URL of the RSS feed into your News Reader</li>
            <li>Drag the URL of the RSS feed into your News Reader</li>
          </ul>
          
        </div>
        
      </body>
      
    </xsl:template>
    
    <xsl:template match="item">
      <dl>
        <dt><a href="{link}"><xsl:value-of select="title"/></a></dt>
        <dd><xsl:copy-of select="description" /></dd>
      </dl>
    </xsl:template>
    
  </xsl:stylesheet>

