123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <?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 stylesheet defines global portal variables and templates. -->
- <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:rss="http://developer.cognos.com/schemas/xts/rss/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xsl xtsext xts rss cm">
-
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
- <!--
- This stylesheet (rss.xslt) consists of the following templates:
- rss:variables
- rss:link
- rss:button
- -->
- <!--
- Template - rss:variables:
- -->
- <xsl:template match="rss:variables">
-
- <out:variable name="abs-gateway">
- <out:choose>
- <out:when test="starts-with($gateway, 'http://') or starts-with($gateway, 'https://')">
- <out:value-of select="$gateway"/>
- </out:when>
- <out:otherwise>
- <out:value-of select="/root/configProps/param[@name='cps']/property[@name='gateway']"/>
- </out:otherwise>
- </out:choose>
- </out:variable>
-
- <out:variable name="rss-url">
- <out:value-of select="$abs-gateway"/>
- <out:for-each select="/root/env/param[@name != 'backURL' and @name != 'errURL' and @name != 'encoding' and (text() or @name = 'search')]">
- <out:choose>
- <out:when test="position() = 1">?</out:when>
- <out:otherwise>&</out:otherwise>
- </out:choose>
- <out:value-of select="@name"/>=<out:value-of select="xtsext:protect(xtsext:urlencode(string(.)),'url', concat('NAME',@name),'getdata')"/>
- </out:for-each>
- <out:text/>&feed=rss<out:text/>
- </out:variable>
-
- </xsl:template>
- <!-- generate a <link> element for Live Bookmark support in Firefox -->
- <xsl:template match="rss:link">
- <link rel="alternate" type="application/rss+xml" href="{'{$rss-url}'}">
- <out:attribute name="title"><xts:string id="IDS_PORTAL"/></out:attribute>
- </link>
- </xsl:template>
-
- <!-- generate the RSS button a link to the rss version of the page -->
- <xsl:template match="rss:button">
- <out:if test="key('system-param', 'hide-rss-feed-links') != 'true'">
- <div id="rss-button" style="position: relative; margin-right: 5px; width:100%">
- <a href="{'{$rss-url}'}" type="application/rss+xml">
- <img id="rss-image" src="{'{$image_root}'}icon_rss_32x15.gif" border="0" align="right" style="margin-right: 5px">
- <out:attribute name="title"><xts:string id="IDS_RSS_FEED_AVAILABLE"/></out:attribute>
- </img>
- </a>
- </div>
- </out:if>
- </xsl:template>
-
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|