<?xml version="1.0" encoding="iso-8859-1"?> <!-- @(#) $Id: rss2html.xslt,v 1.1 2005/06/20 08:40:04 omaralzabir Exp $ --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rss="http://purl.org/rss/1.0/" xmlns="http://www.w3.org/1999/xhtml" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <xsl:output method="html"/> <xsl:template match="/"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <style> <![CDATA[ BODY, A, TD, P { background-color: white; font-family: "Trebuchet MS", Tahoma, Verdana, Arial; } HR { clear:all; color: #CCCCCC; height: 1; border: 1px dashed;} a:link { color: #003399; text-decoration: none;} a:visited { color: #003399; text-decoration: none;} a:hover { color: #ff9900; text-decoration: underline;} h1 { font-size:14pt; font-weight:bold; } a img { border-width:0; } a.title { color:black; font-weight: bolder; font-size:12pt; } small { color: dimgray; } .post { border:1px solid lightgrey; padding: 5px; margin-bottom: 3px; } ]]> </style> </head> <body> <xsl:apply-templates select="rss/channel" /> </body> </html> </xsl:template> <xsl:template match="channel"> <div> <h1> <a href="{link}" target="_blank"><xsl:value-of select="title" /></a> </h1> <xsl:apply-templates select="item" /> <hr /> <div style="float:right"> <small><a href="http://sourceforge.net/projects/rssfeederdotnet">RSS Feeder</a></small><br/> <A href="http://sourceforge.net"> <IMG src="http://sourceforge.net/sflogo.php?group_id=140453&type=1&{link}" width="88" height="31" border="0" alt="SourceForge.net Logo" /></A> </div> </div> </xsl:template> <xsl:template match="item"> <div class="post"> <p><a class="title" href="{link}" target="_blank"><xsl:value-of select="title" /></a></p> <!-- the id decodeme is necessary for a fix applied in javascript --> <div id="decodeme" > <xsl:choose> <xsl:when test="content:encoded"> <xsl:value-of disable-output-escaping="yes" select="content:encoded" /> </xsl:when> <xsl:when test="description"> <xsl:value-of disable-output-escaping="yes" select="description" /> </xsl:when> </xsl:choose> </div> <p><small> <xsl:if test="dc:creator"> Author: <xsl:value-of select="dc:creator" /> </xsl:if> <xsl:if test="category"> | Category: <xsl:value-of select="category" /> </xsl:if> | Date: <xsl:value-of select="pubDate" /> <xsl:if test="slash:comments"> | Comments: <xsl:value-of select="slash:comments" /> </xsl:if> | <a href="{link}" target="_blank">Source</a> </small> </p> </div> </xsl:template> </xsl:stylesheet>
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)