<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- 
    Auteur : D.Guebey

    Cette feuille XSLT convertit un fichier rss simplifie en XHTML
    Creation      :
        28 avr 2005
    Modifications :
    TODO :
-->

<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:content="http://purl.org/rss/1.0/modules/content/"
        xmlns:rss="http://www.dg77.net/XML/"
	exclude-result-prefixes="rss content"
>

<xsl:output method="xml"
	indent="yes"
	encoding="iso-8859-1"
	media-type="text/xml"
        doctype-public="-//W3C//DTD XHTML 1.1//EN"
        doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
	omit-xml-declaration="no"
/>

<xsl:strip-space elements="*" />

<xsl:template match="/">
<html xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
<meta>
        <xsl:attribute name="name">date</xsl:attribute>
        <xsl:attribute name="content"><xsl:value-of select="rss:rss/rss:pubDate"/></xsl:attribute>
</meta>
<link media="print" href="../rss_prt.css" type="text/css" rel="stylesheet" />
<link media="screen" href="../rss.css" type="text/css" rel="stylesheet" />
<title><xsl:value-of select="rss:rss/rss:title"/></title>
</head>
<body id="debut" class="style1">
        <xsl:apply-templates />
</body>
</html>
</xsl:template>

<xsl:template match="rss:rss">

<xsl:choose>
    <xsl:when test="rss:channel/rss:title != ''">
        <h3 class="centr"><xsl:value-of select="rss:channel/rss:title"/></h3>
    </xsl:when>
    <xsl:when test="rss:title != ''">
        <h3 class="centr"><xsl:value-of select="rss:title"/></h3>
    </xsl:when>
    <xsl:when test="rss:description/rss:title != ''">
        <h3 class="centr"><xsl:value-of select="rss:description/rss:title"/></h3>
    </xsl:when>
    <xsl:otherwise/>
</xsl:choose>
<xsl:choose>
    <xsl:when test="rss:channel/rss:description != ''">
        <div><small><xsl:value-of select="rss:channel/rss:description"/></small></div>
    </xsl:when>
    <xsl:when test="rss:description != ''">
        <div><small><xsl:value-of select="rss:description"/></small></div>
    </xsl:when>
    <xsl:otherwise/>
</xsl:choose>
<xsl:choose>
    <xsl:when test="rss:channel/rss:link != ''">
        <div><a><xsl:attribute name="href"><xsl:value-of select="rss:channel/rss:link"/></xsl:attribute><xsl:value-of select="rss:channel/rss:link"/></a></div>
    </xsl:when>
    <xsl:when test="rss:link != ''">
        <div><a><xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute><xsl:value-of select="rss:link"/></a></div>
    </xsl:when>
    <xsl:otherwise/>
</xsl:choose>
<hr />
        <dl>
        <xsl:apply-templates/>
        </dl>
</xsl:template>

<xsl:template match="rss:item">
<dt>
    <!-- id seulement si element guid -->
    <xsl:if test="./rss:guid != ''">
        <xsl:attribute name="id"><xsl:value-of select="./rss:guid" /></xsl:attribute>
    </xsl:if>
    <xsl:if test="./rss:link != ''">
        <a><xsl:attribute name="href"><xsl:value-of select="./rss:link" /></xsl:attribute>
            <b><xsl:value-of select="rss:title" /></b>
        </a>
        <span class="print">[<span class="fspeti"><xsl:value-of select="./rss:link"/></span>]</span>
    </xsl:if>
  <xsl:if test="./rss:link = ''">
        <b><xsl:value-of select="rss:title" /></b>
  </xsl:if>
</dt>
    <xsl:if test="./rss:description != ''">
        <dd><small><xsl:value-of select="./rss:description"/></small></dd>
    </xsl:if>
</xsl:template>

<xsl:template match="rss:channel">
     <xsl:apply-templates/>
</xsl:template>

<xsl:template match="rss:language"/>
<xsl:template match="rss:title"/>
<xsl:template match="rss:description"/>
<xsl:template match="rss:link"/>
<xsl:template match="rss:items" />
<xsl:template match="rss:pubDate" />

<!--xsl:template match="rss:item">
        <item><xsl:apply-templates /></item>
</xsl:template-->

<!--xsl:template match="rss:title">
        <title><xsl:apply-templates /></title>
</xsl:template-->

<!--xsl:template match="rss:link">
        <link><xsl:apply-templates /></link>
</xsl:template-->

<!--xsl:template match="rss:description">
        <description><xsl:apply-templates /></description>
</xsl:template-->

<!--xsl:template match="dc:date">
        <pubDate><xsl:apply-templates /></pubDate>
</xsl:template-->

<xsl:template match="content:encoded">
<div><xsl:apply-templates /></div>
</xsl:template>

<!-- omissions ************************ -->





</xsl:stylesheet>
