home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 64
/
Freelog064.iso
/
Dossier
/
SimpleBrowser
/
simpleBrowser.msi
/
_D82D16C5E4F5BFCBD7413D2074124C56
/
_230D00014A744D2095E83E99944BBAB4
< prev
next >
Wrap
Extensible Markup Language
|
2004-01-05
|
10KB
|
337 lines
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rss09="http://my.netscape.com/rdf/simple/0.9/">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/rss/channel">
<html>
<head>
<title><xsl:value-of select="title"/></title>
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#ecac00">
<p>
<strong><font size="5" face="arial,verdana"><a><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
<xsl:value-of select="title"/></a></font></strong>
</p>
<xsl:if test="image">
<!--
-->
<p><img><xsl:attribute name="src"><xsl:value-of select="image/url"/></xsl:attribute>
<xsl:if test="image/width">
<xsl:attribute name="width"><xsl:value-of select="image/width"/></xsl:attribute>
</xsl:if>
<xsl:if test="image/height">
<xsl:attribute name="height"><xsl:value-of select="image/height"/></xsl:attribute>
</xsl:if>
</img></p>
</xsl:if>
<xsl:if test="description">
<strong><font size="4" face="arial,verdana">
<xsl:value-of select="description"/>
</font></strong>
</xsl:if>
<p>
<font size="3" face="arial,verdana" color="#666666">
<xsl:if test="lastBuildDate">
<strong>Last Modified:
<xsl:value-of select="lastBuildDate"/>
</strong>
</xsl:if>
<xsl:if test="pubDate">
<p></p><strong> Publication Date:
<xsl:value-of select="pubDate"/>
</strong>
</xsl:if>
</font>
</p>
<HR size="5" color="darkblue" />
<p></p>
<table width="100%" border="1">
<dl>
<xsl:for-each select="item">
<tr>
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<td bgcolor="#eeeeee">
<strong><font size="5" face="arial,verdana">
<dt>
<a><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
<xsl:value-of select="title"/> </a>
<xsl:if test="author">
(<xsl:value-of select="author"/>)
</xsl:if>
</dt>
</font></strong>
<p></p>
<dd>
<font size="5" face="arial,verdana">
<xsl:value-of select="description"/>
</font>
<br></br>
<font size="4" face="arial,verdana" color="#666666">
<xsl:if test="pubDate">
(<xsl:value-of select="pubDate"/>)
</xsl:if>
</font>
</dd>
<p></p>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<strong><font size="5" face="arial,verdana">
<dt>
<a><xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
<xsl:value-of select="title"/> </a>
<xsl:if test="author">
(<xsl:value-of select="author"/>)
</xsl:if>
</dt>
</font></strong>
<p></p>
<dd>
<font size="5" face="arial,verdana">
<xsl:value-of select="description"/>
</font>
<br></br>
<font size="4" face="arial,verdana" color="#666666">
<xsl:if test="pubDate">
(<xsl:value-of select="pubDate"/>)
</xsl:if>
</font>
</dd>
<p></p>
</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:for-each>
</dl>
</table>
<p>
<!-- ***************** Copyright ***************
<xsl:value-of select="copyright"/>
-->
</p>
</body>
</html>
</xsl:template>
<xsl:template match="/rdf:RDF">
<html>
<head>
<title><xsl:value-of select="rss09:channel/rss09:title"/><xsl:value-of select="rss:channel/rss:title"/></title>
</head>
<body bgcolor="#eeeeee" link="##006699" vlink="#006699">
<p>
<strong><font size="5" face="arial,verdana"><a><xsl:attribute name="href"><xsl:value-of select="rss:channel/rss:link"/><xsl:value-of select="rss09:channel/rss09:link"/></xsl:attribute>
<xsl:value-of select="rss:channel/rss:title"/><xsl:value-of select="rss09:channel/rss09:title"/></a>
<p></p>
<xsl:if test="rss:image">
<!--
-->
<p><img><xsl:attribute name="src"><xsl:value-of select="rss:image/rss:url"/></xsl:attribute> </img></p>
</xsl:if>
<xsl:value-of select="rss:channel/rss:description"/><xsl:value-of select="rss09:channel/rss09:description"/>
</font></strong>
</p>
<strong>
<p>
<!-- Make the date presentable -->
<xsl:if test="rss:channel/dc:date">
Date:
<xsl:variable name="datetime" select="rss:channel/dc:date"/>
<xsl:variable name="day" select="substring($datetime, 9, 2)"/>
<xsl:variable name="month" select="substring($datetime, 6, 2)"/>
<xsl:variable name="year" select="substring($datetime, 0, 5)"/>
<xsl:value-of select="concat($day, '/', $month, '/', $year)"/> -
<xsl:value-of select="substring($datetime, 12, 5)"/>
</xsl:if>
<xsl:if test="rss:channel/dc:publisher">
<p></p>Publisher: <xsl:value-of select="rss:channel/dc:publisher"/>
<xsl:if test="rss:channel/dc:publisher">
Subject: <xsl:value-of select="rss:channel/dc:subject"/>
</xsl:if>
</xsl:if>
</p>
</strong>
<HR size="5" color="darkblue" />
<table width="100%" border="1">
<dl>
<xsl:for-each select="rss:item">
<tr>
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<td bgcolor="#cccccc">
<strong><font size="5" face="arial,verdana">
<dt>
<a><xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute>
<xsl:value-of select="rss:title"/></a>
<xsl:if test="dc:subject">
- <xsl:value-of select="dc:subject"/>
</xsl:if>
<xsl:if test="dc:creator">
- (Author: <xsl:value-of select="dc:creator"/>)
</xsl:if>
</dt>
</font></strong>
<dd>
<font size="5" face="arial,verdana">
<xsl:if test="rss:description">
<xsl:value-of select="rss:description"/>
</xsl:if>
<!-- Format the publish date -->
<xsl:if test="dc:date">
(<xsl:variable name="pubdate" select="dc:date"/>
<xsl:variable name="pubday" select="substring($pubdate, 9, 2)"/>
<xsl:variable name="pubmonth" select="substring($pubdate, 6, 2)"/>
<xsl:variable name="pubyear" select="substring($pubdate, 0, 5)"/>
<xsl:value-of select="concat($pubday, '/', $pubmonth, '/', $pubyear)"/> -
<xsl:value-of select="substring($pubdate, 12, 5)"/>)
</xsl:if>
</font>
</dd>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<strong><font size="5" face="arial,verdana">
<dt>
<a><xsl:attribute name="href"><xsl:value-of select="rss:link"/></xsl:attribute>
<xsl:value-of select="rss:title"/></a>
</dt>
</font></strong>
<dd>
<font size="5" face="arial,verdana">
<xsl:if test="rss:description">
<xsl:value-of select="rss:description"/>
</xsl:if>
<!-- Format the publish date -->
<xsl:if test="dc:date">
(<xsl:variable name="pubdate" select="dc:date"/>
<xsl:variable name="pubday" select="substring($pubdate, 9, 2)"/>
<xsl:variable name="pubmonth" select="substring($pubdate, 6, 2)"/>
<xsl:variable name="pubyear" select="substring($pubdate, 0, 5)"/>
<xsl:value-of select="concat($pubday, '/', $pubmonth, '/', $pubyear)"/> -
<xsl:value-of select="substring($pubdate, 12, 5)"/>)
</xsl:if>
</font>
</dd>
</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:for-each>
<!--Now do it for the 0.9 type RDF feeds-->
<xsl:for-each select="rss09:item">
<tr>
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<td bgcolor="#eeeeee">
<strong><font size="5" face="arial,verdana">
<dt>
<a><xsl:attribute name="href"><xsl:value-of select="rss09:link"/></xsl:attribute>
<xsl:value-of select="rss09:title"/></a>
</dt>
</font></strong>
<dd>
<font size="5">
<xsl:if test="rss09:description">
<xsl:value-of select="rss09:description"/>
</xsl:if>
<!-- Format the publish date -->
<xsl:if test="dc:date">
(<xsl:variable name="pubdate" select="dc:date"/>
<xsl:variable name="pubday" select="substring($pubdate, 9, 2)"/>
<xsl:variable name="pubmonth" select="substring($pubdate, 6, 2)"/>
<xsl:variable name="pubyear" select="substring($pubdate, 0, 5)"/>
<xsl:value-of select="concat($pubday, '/', $pubmonth, '/', $pubyear)"/> -
<xsl:value-of select="substring($pubdate, 12, 5)"/>)
</xsl:if>
</font>
</dd>
</td>
</xsl:when>
<xsl:otherwise>
<td>
<strong><font size="5" face="arial,verdana">
<dt>
<a><xsl:attribute name="href"><xsl:value-of select="rss09:link"/></xsl:attribute>
<xsl:value-of select="rss09:title"/></a>
</dt>
</font></strong>
<dd>
<font size="5" face="arial,verdana">
<xsl:if test="rss09:description">
<xsl:value-of select="rss09:description"/>
</xsl:if>
<!-- Format the publish date -->
<xsl:if test="dc:date">
(<xsl:variable name="pubdate" select="dc:date"/>
<xsl:variable name="pubday" select="substring($pubdate, 9, 2)"/>
<xsl:variable name="pubmonth" select="substring($pubdate, 6, 2)"/>
<xsl:variable name="pubyear" select="substring($pubdate, 0, 5)"/>
<xsl:value-of select="concat($pubday, '/', $pubmonth, '/', $pubyear)"/> -
<xsl:value-of select="substring($pubdate, 12, 5)"/>)
</xsl:if>
</font>
</dd>
</td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:for-each>
</dl>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>