home *** CD-ROM | disk | FTP | other *** search
- <xsl:stylesheet version='1.0'
- xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
- xmlns:content = 'http://purl.org/rss/1.0/modules/content/'
- xmlns:xhtml='http://www.w3.org/1999/xhtml'
- xmlns:slash='http://purl.org/rss/1.0/modules/slash/'
- xmlns:dc='http://purl.org/dc/elements/1.1/'
- exclude-result-prefixes='content slash dc'>
-
- <xsl:output method='xml' indent='yes' />
-
-
- <!-- channel group newspaper -->
- <xsl:template match="newspaper[@type='group']">
- <html><head>
- <title><xsl:value-of select='title'/></title>
- <!-- <base href="{//channel/link}" /> -->
- </head>
- <body>
- <xsl:for-each select="//channel">
- <xsl:choose>
- <xsl:when test="current()/image">
- <div class="PostTitle" style="FLOAT: right">
- <a href="{current()/image/link}" title="{current()/image/title}"><img src="{current()/image/url}" alt="{current()/image/title}" border="0">
- <xsl:if test="current()/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="current()/image/width"/></xsl:attribute></xsl:if>
- <xsl:if test="current()/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="current()/image/height"/></xsl:attribute></xsl:if>
- </img></a>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <div class="PostTitle" style="FLOAT: right">
- <a href="{current()/link}"><xsl:value-of select="current()/title" /></a>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select='current()//item'>
- <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
- <td valign="top" bgcolor="#006666">
- <font
- face="arial,helvetica" size="4" color="#FFFFFF">
- <b><xsl:value-of disable-output-escaping='yes' select='current()/title'/></b></font></td>
- </tr></table>
- <xsl:choose>
- <xsl:when test='current()/author'>
- <b>Posted by <xsl:value-of select='current()/author'/></b>
- </xsl:when>
- <xsl:when test='current()/dc:creator'>
- <b>Posted by <xsl:value-of select='current()/dc:creator'/></b>
- </xsl:when>
- </xsl:choose>
- <b><xsl:text> </xsl:text> on <xsl:value-of select='current()/pubDate'/></b><br />
- <xsl:if test='current()/category'><b><font size="2">from the
- <xsl:value-of select='current()/category' /> dept.<b></b></font></b></xsl:if>
- <br />
- <xsl:choose>
- <xsl:when test='current()/xhtml:body'>
- <xsl:copy-of select='current()/xhtml:body'/>
- </xsl:when>
- <xsl:when test='current()/content:encoded'>
- <xsl:value-of disable-output-escaping='yes' select='current()/content:encoded'/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
- </xsl:otherwise>
- </xsl:choose>
- <p>
- <b>(</b>
- <a href='{current()/link}'><b>Read on...</b></a>
- <xsl:choose>
- <xsl:when test='current()/comments'> |<xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:when>
- <xsl:when test='current()/slash:comments'> |
- <xsl:value-of select='current()/slash:comments'/> Comments...
- </xsl:when>
- </xsl:choose>
- <b>)</b>
- </p>
- </xsl:for-each>
- <hr />
- </xsl:for-each>
- </body></html>
- </xsl:template>
-
-
- <!-- channel newspaper -->
- <xsl:template match="newspaper[@type='channel']">
- <html><head>
- <title><xsl:value-of select='//channel/title'/></title>
- <base href="{//channel/link}" />
- </head>
- <body>
- <xsl:choose>
- <xsl:when test="//channel/image">
- <div class="PostTitle" style="FLOAT: right">
- <a href="{//channel/image/link}" title="{//channel/image/title}"><img src="{//channel/image/url}" alt="{//channel/image/title}" border="0">
- <xsl:if test="//channel/image/width!=''"><xsl:attribute name="width"><xsl:value-of select="//channel/image/width"/></xsl:attribute></xsl:if>
- <xsl:if test="//channel/image/height!=''"><xsl:attribute name="height"><xsl:value-of select="//channel/image/height"/></xsl:attribute></xsl:if>
- </img></a>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <div class="PostTitle" style="FLOAT: right">
- <a href="{//channel/link}"><xsl:value-of select="//channel/title" /></a>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select='//item'>
- <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
- <td valign="top" bgcolor="#006666">
- <font
- face="arial,helvetica" size="4" color="#FFFFFF">
- <b><xsl:value-of disable-output-escaping='yes' select='current()/title'/></b></font></td>
- </tr></table>
- <xsl:choose>
- <xsl:when test='current()/author'>
- <b>Posted by <xsl:value-of select='current()/author'/></b>
- </xsl:when>
- <xsl:when test='current()/dc:creator'>
- <b>Posted by <xsl:value-of select='current()/dc:creator'/></b>
- </xsl:when>
- </xsl:choose>
- <b><xsl:text> </xsl:text> on <xsl:value-of select='current()/pubDate'/></b><br />
- <xsl:if test='current()/category'><b><font size="2">from the
- <xsl:value-of select='current()/category' /> dept.<b></b></font></b></xsl:if>
- <br />
- <xsl:choose>
- <xsl:when test='current()/xhtml:body'>
- <xsl:copy-of select='current()/xhtml:body'/>
- </xsl:when>
- <xsl:when test='current()/content:encoded'>
- <xsl:value-of disable-output-escaping='yes' select='current()/content:encoded'/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of disable-output-escaping='yes' select='current()/description'/>
- </xsl:otherwise>
- </xsl:choose>
- <p>
- <b>(</b>
- <a href='{current()/link}'><b>Read on...</b></a>
- <xsl:choose>
- <xsl:when test='current()/comments'> |<xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='current()/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='current()/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:when>
- <xsl:when test='current()/slash:comments'> |
- <xsl:value-of select='current()/slash:comments'/> Comments...
- </xsl:when>
- </xsl:choose>
- <b>)</b>
- </p>
- </xsl:for-each>
- </body></html>
- </xsl:template>
-
-
- <!-- single news item -->
- <xsl:template match="newspaper[@type='newsitem']">
- <html><head>
- <title><xsl:value-of select='//item/title'/></title>
- <base href="{//item/link}" />
- </head>
- <body>
- <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>
- <td valign="top" bgcolor="#006666">
- <font
- face="arial,helvetica" size="4" color="#FFFFFF">
- <b><xsl:value-of disable-output-escaping='yes' select='//item/title'/></b></font></td>
- </tr></table>
- <xsl:choose>
- <xsl:when test='//item/author'>
- <b>Posted by <xsl:value-of select='//item/author'/></b>
- </xsl:when>
- <xsl:when test='//item/dc:creator'>
- <b>Posted by <xsl:value-of select='//item/dc:creator'/></b>
- </xsl:when>
- </xsl:choose>
- <b><xsl:text> </xsl:text> on <xsl:value-of select='//item/pubDate'/></b><br />
- <xsl:if test='//item/category'><b><font size="2">from the
- <xsl:value-of select='//item/category' /> dept.<b></b></font></b></xsl:if>
- <br />
- <xsl:choose>
- <xsl:when test='//item/xhtml:body'>
- <xsl:copy-of select='//item/xhtml:body'/>
- </xsl:when>
- <xsl:when test='//item/content:encoded'>
- <xsl:value-of disable-output-escaping='yes' select='//item/content:encoded'/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of disable-output-escaping='yes' select='//item/description'/>
- </xsl:otherwise>
- </xsl:choose>
- <p>
- <b>(</b>
- <a href='{//item/link}'><b>Read on...</b></a>
- <xsl:choose>
- <xsl:when test='//item/comments'> |<xsl:text disable-output-escaping='yes'> </xsl:text>
- <xsl:text disable-output-escaping='yes'><a href='</xsl:text><xsl:value-of disable-output-escaping='yes' select='//item/comments'/><xsl:text disable-output-escaping='yes'>'></xsl:text>
- <xsl:value-of select='//item/slash:comments'/> Comments... <xsl:text disable-output-escaping='yes'></a></xsl:text>
- </xsl:when>
- <xsl:when test='//item/slash:comments'> |
- <xsl:value-of select='//item/slash:comments'/> Comments...
- </xsl:when>
- </xsl:choose>
- <b>)</b>
- </p>
-
- </body></html>
- </xsl:template>
- </xsl:stylesheet>