123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (C) Copyright IBM Corp. 2005, 2016
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:atom="http://www.w3.org/2005/Atom"
- exclude-result-prefixes="xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:variable name="script-name" select="/root/http/param[@name = 'SCRIPT_NAME']"/>
- <xsl:variable name="webcontent" select="/root/http/param[@name = 'WEB_CONTENT_ROOT']"/>
- <xsl:variable name="iwidget-uri" select="concat($script-name, '/iwidget/bridge')"/>
- <!-- -=-=-=-=-=-=-=- -->
- <xsl:template match="/">
- <xsl:apply-templates select="/root/catalog"/>
- </xsl:template>
- <xsl:template match="catalog">
- <atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">
- <atom:id>tag:com:ibm:cognos:catalog:iwidget</atom:id>
- <atom:title type="text">IBM Cognos iWidget Catalog</atom:title>
- <atom:updated>2009-03-24T22:01:37Z</atom:updated>
- <atom:author>
- <atom:name>Sample User1</atom:name>
- <atom:email>email1@companyname.com</atom:email>
- </atom:author>
- <atom:contributor>
- <atom:name>Sample User2</atom:name>
- <atom:email>email2@companyname.com</atom:email>
- </atom:contributor>
- <atom:contributor>
- <atom:name>Sample User3</atom:name>
- <atom:email>email3@companyname.com</atom:email>
- </atom:contributor>
- <atom:contributor>
- <atom:name>Sample User4</atom:name>
- <atom:email>email4@companyname.com</atom:email>
- </atom:contributor>
- <xsl:apply-templates select="entry"/>
- </atom:feed>
- </xsl:template>
- <xsl:template match="entry">
- <atom:entry xmlns="http://www.w3.org/2005/Atom">
- <xsl:call-template name="atom-properties">
- <xsl:with-param name="is-entry" select="true()"/>
- </xsl:call-template>
- <xsl:call-template name="links"/>
- </atom:entry>
- </xsl:template>
-
- <xsl:template name="atom-properties">
- <xsl:param name="is-entry"/>
- <atom:id>
- <xsl:value-of select="concat('tag:ibm:cognos:catalog:iwidget:', position())"/>
- </atom:id>
- <atom:title type="text">
- <xsl:value-of select="title"/>
- </atom:title>
-
- <atom:updated>2009-03-24T22:01:37Z</atom:updated>
- <xsl:if test="$is-entry">
- <atom:published>2009-03-24T22:01:37Z</atom:published>
- <xsl:if test="description != ''">
- <atom:summary>
- <xsl:value-of select="description"/>
- </atom:summary>
- </xsl:if>
- </xsl:if>
- </xsl:template>
-
- <xsl:template name="links">
- <xsl:param name="item" select="."/>
- <xsl:param name="rel" select="'alternate'"/>
- <!--
- <atom:link rel="fragment" type="application/x-fragment+xml" href="{ $dashboard-uri }{ $item/path }"/>
- <atom:link rel="{ $rel }" type="application/xml" href="{ $iwidget-uri }{ $item/path }"/>
- -->
- <atom:link rel="{ $rel }" type="application/x-iwidget+xml" href="{ $iwidget-uri }{ $item/path }"/>
- <atom:link rel="iwidget" type="application/x-iwidget+xml" href="{ $iwidget-uri }{ $item/path }"/>
-
- <xsl:if test="$item/icon">
- <atom:link rel="icon" type="{ $item/icon/@type }" href="{ $webcontent }{ $item/icon }"/>
- </xsl:if>
- <xsl:if test="$item/thumbnail">
- <atom:link rel="thumbnail" type="{ $item/thumbnail/@type }" href="{ $webcontent }{ $item/thumbnail }"/>
- </xsl:if>
-
- </xsl:template>
- </xsl:stylesheet>
|