123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: CCS
- (c) Copyright IBM Corp. 2005, 2010
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0" xmlns:cog8="http://developer.cognos.com/schemas/report/5.0/" xmlns:ccs="com.cognos.ccs.xslt.XSLTFunctions" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
- <xsl:template match="/">
- <atom:feed>
- <atom:id>
- <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@')"/>
- </atom:id>
- <atom:title>@report_title@</atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:author>
- <atom:name>Cognos</atom:name>
- </atom:author>
- <atom:link rel="self" type="application/atom+xml" href="@report_gateway@/rds/atom/path/@report_id@?v=@requestversion@"/>
- <atom:link rel="alternate" type="text/xml" href="@report_gateway@/rds/@output@/path/@report_id@?v=@requestversion@"/>
- <xsl:if test="data/tab/crosstab">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">dimLine</xsl:with-param>
- <xsl:with-param name="entryType">textframe</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">2</xsl:with-param>
- <xsl:with-param name="entryType">crosstab</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:if test="data/tab/status_line/@status">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">3</xsl:with-param>
- <xsl:with-param name="entryType">textframe</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </atom:feed>
- </xsl:template>
- <xsl:template match="*">
- <!--Unknown element. Ignore-->
- </xsl:template>
- <xsl:template name="atomEntry">
- <xsl:param name="entryID"/>
- <xsl:param name="entryIcon"/>
- <xsl:param name="entryType"/>
- <atom:entry>
- <atom:id>
- <xsl:choose>
- <xsl:when test="function-available('ccs:encodeID')">
- <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',ccs:encodeID($entryID))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',$entryID)"/>
- </xsl:otherwise>
- </xsl:choose>
- </atom:id>
- <atom:title>
- <xsl:value-of select="$entryID"/>
- </atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:link>
- <xsl:attribute name="rel">icon</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/ccs/images/', $entryType,'_icon.gif')"/></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">alternate</xsl:attribute>
- <xsl:attribute name="type">application/x-ldx+xml</xsl:attribute>
- <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:encodeID')"><xsl:value-of select="concat('@report_gateway@/rds/@output@/path/@report_id@?selection=',ccs:encodeID($entryID),'&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/@output@/path/@report_id@?selection=',$entryID,'&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <cm:objectClass>reportpart</cm:objectClass>
- </atom:entry>
- </xsl:template>
- </xsl:stylesheet>
|