<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/1999/xhtml"
  xmlns:rss="http://purl.org/rss/1.0/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/"
  xmlns:cc="http://web.resource.org/cc/" version="1.0"
  exclude-result-prefixes="rdf rss content sy dc cc admin">
  <xsl:output method="html" indent="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:key name="items" match="rss:item" use="@rdf:about"/>
  <xsl:template match="/">
    <html>
      <head>
        <script type="text/javascript" src="encodage.js">
          <xsl:comment/>
        </script>
        <title>
          <xsl:value-of select="rdf:RDF/rss:channel/rss:title"/>
        </title>
      </head>
      <body onload="decode()">
        <h1>
          <xsl:value-of select="rdf:RDF/rss:channel/rss:title"/>
        </h1>
        <p>
          <xsl:value-of select="rdf:RDF/rss:channel/rss:description"/>
        </p>
        <xsl:apply-templates select="rdf:RDF/rss:channel/rss:items/rdf:Seq/rdf:li"/>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="rdf:li">
    <xsl:for-each select="key('items', @rdf:resource)">
      <div>
        <h2>
          <xsl:value-of select="rss:title"/>
        </h2>
        <div class="encoded">
          <xsl:value-of select="content:encoded"/>
        </div>
      </div>
    </xsl:for-each>
  </xsl:template>

</xsl:stylesheet>
