<?xml version="1.0"?> 

<!--
Author:  Kevin A Burton (burton@apache.org)
$Id: rss.xsl,v 1.8 2000/05/21 11:34:48 burton Exp $
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:downlevel="http://my.netscape.com/rdf/simple/0.9/"
                version="1.0">

    <xsl:output indent="yes" method="html"/>

    <!-- BEGIN /document node support for RSS-->
    <xsl:template match="/rss">
        <div>

            <xsl:apply-templates select="channel"/>
            <xsl:apply-templates select="channel/item"/>
            <xsl:apply-templates select="channel/textinput"/>            
        </div>
        
    </xsl:template>


    <xsl:template match="/rdf:RDF">
        <div>

            <xsl:apply-templates select="downlevel:channel"/>

            <xsl:apply-templates select="downlevel:item"/>

            <xsl:apply-templates select="downlevel:textinput"/>
            
        </div>
    </xsl:template>

    <!-- END /document node support for RSS-->    
    
    <xsl:template match="item">

        <xsl:variable name="description"     select="downlevel:description"/>
    
        <li>
                <a href="{link}">
                    <xsl:value-of select="title"/>
                </a>
            <p>
            <xsl:if test="$description != ''">
                <p>
                <xsl:value-of select="$description"/>
                </p>
            </xsl:if>
            </p>
        </li>
        
    </xsl:template>
    
    <xsl:template match="channel">

        <xsl:variable name="description"     select="description"/>    
        
        <xsl:if test="$description != ''">
            <p>

            <xsl:apply-templates select="image"/>
            
            <xsl:value-of select="$description"/>            

            </p>
        </xsl:if>
        
    </xsl:template>


    <xsl:template match="downlevel:item">

        <xsl:variable name="description"     select="downlevel:description"/>
    
        <li>
                <a href="{downlevel:link}">
                    <xsl:value-of select="downlevel:title"/>
                </a>
            <p>
            <xsl:if test="$description != ''">
                <p>
                <xsl:value-of select="$description"/>            
                </p>
            </xsl:if>
            </p>
        </li>
        
    </xsl:template>
    
    <xsl:template match="downlevel:channel">
        
        <xsl:variable name="description"     select="downlevel:description"/>
        
            <xsl:if test="$description != ''">
                <p>

                <xsl:apply-templates select="../downlevel:image"/>

                <xsl:value-of select="$description"/>
                </p>
            </xsl:if>
        
    </xsl:template>
    
    <!-- BEGIN TEXTINPUT SUPPORT -->

    <xsl:template match="downlevel:textinput">
        
        <form action="{./downlevel:link}">
        <xsl:value-of select="./downlevel:description"/>
        <br>
        <input type="text" name="{./downlevel:name}" value=""></input>
        <input type="submit" name="submit" value="{./downlevel:title}"></input>
        </br>
        </form>
        
    </xsl:template>

    <xsl:template match="textinput">
        
        <form action="{./link}">
        <xsl:value-of select="./description"/>
        <br>
        <input type="text" name="{./name}" value=""></input>
        <input type="submit" name="submit" value="{./title}"></input>
        </br>
        </form>
        
    </xsl:template>

    
    <!-- END TEXTINPUT SUPPORT -->    
    
    <!-- BEGIN IMAGE SUPPORT -->        

    <xsl:template match="image">

        <a href="{./link}" align="right">
            <img alt="{./title}" 
                 src="{./url}" 
                 width="{./width}" 
                 height="{./height}" 
                 align="right" 
                 border="0"></img>
        </a>
        
    </xsl:template>

    <xsl:template match="downlevel:image">

        <a href="{./downlevel:link}" align="right">
            <img alt="{./downlevel:title}" 
                 src="{./downlevel:url}" 
                 width="{./downlevel:width}" 
                 height="{./downlevel:height}" 
                 align="right" 
                 border="0"></img>
        </a>
        
    </xsl:template>
    
    <!-- BEGIN IMAGE SUPPORT -->        

    
</xsl:stylesheet>



