123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <!--
- This morphlet outputs a stylesheet that transforms an RSS 2.0 feed into a simple HTML presentation. If you want to make it look fancier,
- use the css file.
- This is meant to be referenced at the top of the RSS feed with an <?xml-stylesheet?> processing instruction like so:
- <?xml-stylesheet href="/cognos8/cgi-bin/(cognosgateway)?b_action=xts.run&m=portal/rssxsl.xts" type="text/xsl"?>
- This way, it is processed in the browser.
-
- I used a morphlet here instead of just a plain xslt file so that it can be skin and message-file sensitive.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <xts:block id="one" type="exec" mode="interpret" processor="XSLT">
-
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:out="dummy-uri"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- exclude-result-prefixes="xsl xtsext xts pf df dp">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <pf:variables/>
-
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset UTF-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <out:stylesheet version="1.0">
- <out:output method="html" version="1.0" encoding="UTF-8"/>
-
- <out:template match="rss[@version='2.0']">
- <html>
- <head>
- <title><xts:string id="IDS_RSS_FEED_AVAILABLE"/></title>
- <link rel="stylesheet" type="text/css" href="{$skin_fonts}"/>
- <link rel="stylesheet" type="text/css" href="{$skin_style}"/>
- </head>
- <body>
- <table class="rss-header" cellspacing="0" cellpadding="0" width="100%" border="0">
- <tbody>
- <tr>
- <td width="95%" ><span class="rss-header-title" > <xts:string id="IDS_RSS_FEED_AVAILABLE"/></span></td>
- <td width="2%" valign="center" class="dialogHeaderLink"> </td>
- <td width="3%" align="center" valign="middle"><a href="javascript:history.back()"><dp:closeMarker/></a></td>
- </tr>
- </tbody>
- </table>
- <out:apply-templates select="channel"/>
-
- <dp:footer>
- <df:button df:id="IDS_CLOSE" df:style="href" df:href="javascript:history.back();"/>
- </dp:footer>
- <!-- These extra divs/spans may be used as catch-alls to add extra images to the page.
- I got this idea from http://www.csszengarden.com/ -->
- <div id="extraDiv1"><span></span></div><div id="extraDiv2"><span></span></div><div id="extraDiv3"><span></span></div>
- <div id="extraDiv4"><span></span></div><div id="extraDiv5"><span></span></div><div id="extraDiv6"><span></span></div>
- </body>
- </html>
- </out:template>
-
- <out:template match="channel">
- <br/>
- <table align="center" cellSpacing="0" width="90%" border="0">
- <tbody>
- <tr>
- <td width="10%" align="center" valign="middle" class="rssLeftPanel" ><img src="{$image_root}/icon_tip_48.gif"/></td>
- <td width="90%" valign="top" class="rssRightPanel">
- <p class="rss-desc"><xts:string id="IDS_RSSVIEW_INTRO_1"/><br/><br/><xts:string id="IDS_RSSVIEW_INTRO_2"/></p></td>
- </tr>
- </tbody>
- </table>
- <br/>
- <table width="90%" align="center" border="0" cellPadding="3px" cellSpacing="0">
- <tbody>
- <tr>
- <td colspan="2" class="rss-title" ><a href="{'{link}'}"><out:value-of select="title"/></a></td>
- </tr>
- <out:if test="description != ''">
- <tr>
- <td colspan="2" class="rss-desc" valign="top"><out:value-of select="description"/><br/></td>
- </tr>
- </out:if>
- <out:apply-templates select="item"/>
- </tbody>
- </table>
- </out:template>
-
- <out:template match="item">
- <tr>
- <td width="3%"></td>
- <td width="97%"><a class="rss-item-title" href="{'{link}'}"><out:value-of select="title"/></a></td>
- </tr>
- <tr>
- <td> </td>
- <td class="rss-desc"><out:value-of select="description"/></td>
- </tr>
- <tr>
- <td> </td>
- <td class="rss-desc" valign="top"><out:value-of select="pubDate"/></td>
- </tr>
- </out:template>
- </out:stylesheet>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|