123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: CCS
- (c) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.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/" xmlns:d="@extensionnamespace@">
- <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" version="1.0"/>
- <xsl:param name="useLocalizedNames" select="false"/>
- <xsl:param name="userLocale" select="en"/>
- <xsl:param name="hexEncodeUnderscores" select="true()"/>
- <xsl:template match="/">
- <xsl:comment> Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated)</xsl:comment>
- <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>@report_author@</atom:name>
- @report_author_email@
- </atom:author>
- <atom:link rel="self" type="application/atom+xml" href="@report_gateway@/rds/atom_ds/report/@report_storeid@?v=@requestversion@"/>
- <atom:link rel="alternate" type="text/xml" href="@report_gateway@/rds/reportData/report/@report_storeid@?version=LATEST&v=@requestversion@"/>
- <atom:link rel="alternate" type="application/x-pagedldx+xml" href="@report_gateway@/rds/pagedReportData/path/@report_id@?v=@requestversion@"/>
- <xsl:apply-templates select="/report/layouts/layout/reportPages/*"/>
- <xsl:apply-templates select="/report/layouts/layout/promptPages/*"/>
- </atom:feed>
- </xsl:template>
- <xsl:template priority="2" match="*[contains(style/CSS/@value, 'visibility:hidden') ]"/>
- <xsl:template match="pageSet">
- <xsl:apply-templates select="./pageOverallGroup/headerPages/*"/>
- <xsl:apply-templates select="./detailPages/*"/>
- <xsl:apply-templates select="./pageOverallGroup/footerPages/*"/>
- <xsl:for-each select="./pageGroups/pageGroup">
- <xsl:apply-templates select="headerPages/*"/>
- <xsl:apply-templates select="footerPages/*"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="page">
- <xsl:call-template name="atomPageEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">page</xsl:with-param>
- <xsl:with-param name="entryIcon">folder</xsl:with-param>
- </xsl:call-template>
- <xsl:element name="subFeed">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="type">page</xsl:attribute>
- <atom:feed>
- <atom:id>
- <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', @name)"/>
- </atom:id>
- <atom:title>
- <xsl:value-of select="@name"/>
- </atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:author>
- <atom:name>@report_author@</atom:name>@report_author_email@
- </atom:author>
- <atom:link rel="self" type="application/atom+xml">
- <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',@name,'&eltype=page','&v=@requestversion@')"/></xsl:attribute>
- </atom:link>
- <xsl:if test="pageHeader/contents/*">
- <xsl:call-template name="atomVirtualEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">header</xsl:with-param>
- <xsl:with-param name="entryIcon">folder</xsl:with-param>
- <xsl:with-param name="entryName">@header_title@</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:apply-templates select="pageBody/contents/*"/>
- <xsl:if test="pageFooter/contents/*">
- <xsl:call-template name="atomVirtualEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">footer</xsl:with-param>
- <xsl:with-param name="entryIcon">folder</xsl:with-param>
- <xsl:with-param name="entryName">@footer_title@</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </atom:feed>
- </xsl:element>
- <xsl:if test="pageHeader/contents/*">
- <xsl:element name="subFeed">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="type">header</xsl:attribute>
- <atom:feed>
- <atom:id>
- <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', @name, ':header')"/>
- </atom:id>
- <atom:title>@header_title@</atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:author>
- <atom:name>@report_author@</atom:name>
- </atom:author>
- <atom:link rel="self" type="application/atom+xml">
- <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',@name,'&eltype=header','&v=@requestversion@')"/></xsl:attribute>
- </atom:link>
- <xsl:apply-templates select="pageHeader/contents/*"/>
- </atom:feed>
- </xsl:element>
- </xsl:if>
- <xsl:if test="pageFooter/contents/*">
- <xsl:element name="subFeed">
- <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
- <xsl:attribute name="type">footer</xsl:attribute>
- <atom:feed>
- <atom:id>
- <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', @name, ':footer')"/>
- </atom:id>
- <atom:title>@footer_title@</atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:author>
- <atom:name>@report_author@</atom:name>
- </atom:author>
- <atom:link rel="self" type="application/atom+xml">
- <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',@name,'&eltype=footer','&v=@requestversion@')"/></xsl:attribute>
- </atom:link>
- <xsl:apply-templates select="pageFooter/contents/*"/>
- </atom:feed>
- </xsl:element>
- </xsl:if>
- </xsl:template>
- <xsl:template match="table">
- <xsl:apply-templates select="tableRows/tableRow"/>
- </xsl:template>
- <xsl:template match="tableRow">
- <xsl:apply-templates select="tableCells/tableCell"/>
- </xsl:template>
- <xsl:template match="tableCell">
- <xsl:apply-templates select="contents/*"/>
- </xsl:template>
- <xsl:template match="block">
- <xsl:apply-templates select="contents/*"/>
- </xsl:template>
- <xsl:template match="list">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">list</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="TOC">
- <xsl:if test="@tocName">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">toc</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="textItem">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">textframe</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="image">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">image</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="crosstab">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">crosstab</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="repeaterTable">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">repeater_table</xsl:with-param>
- <xsl:with-param name="entryIcon">repeatertable</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="repeater">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">repeater</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="hyperlink">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">hyperlink</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="HTMLItem">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">html</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="richTextItem">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">richtext</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="customContent">
- <!--Custom content items are mapped to Richtext in LDX -->
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">richtext</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="bookmark">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">bookmark</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="TOCEntry">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">bookmark</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="textBox">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">textBox</xsl:with-param>
- <xsl:with-param name="entryIcon">textbox</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectDate">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectDate</xsl:with-param>
- <xsl:with-param name="entryIcon">selectdate</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectDateTime">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectDateTime</xsl:with-param>
- <xsl:with-param name="entryIcon">selectdatetime</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectTime">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectTime</xsl:with-param>
- <xsl:with-param name="entryIcon">selecttime</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectInterval">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectInterval</xsl:with-param>
- <xsl:with-param name="entryIcon">selectinterval</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectValue">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectValue</xsl:with-param>
- <xsl:with-param name="entryIcon">selectvalue</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectWithSearch">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectWithSearch</xsl:with-param>
- <xsl:with-param name="entryIcon">selectwithsearch</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="selectWithTree">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">selectWithTree</xsl:with-param>
- <xsl:with-param name="entryIcon">selectwithtree</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="generatedPrompt">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">generatedPrompt</xsl:with-param>
- <xsl:with-param name="entryIcon">generatedprompt</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="fieldSet">
- <xsl:apply-templates select="contents/*"/>
- </xsl:template>
- <xsl:template match="conditionalBlocks">
- <xsl:variable name="conditionalBlocksNum">
- <xsl:value-of select="1+count(preceding::conditionalBlocks)" />
- </xsl:variable>
- <xsl:if test="conditionalBlockDefault/contents">
- <xsl:variable name="blockName">
- <xsl:value-of select="concat('defaultBlock_',$conditionalBlocksNum)"/>
- </xsl:variable>
- <xsl:variable name="blockTitle">
- <xsl:choose>
- <xsl:when test="function-available('ccs:getLocalizedName')">
- <xsl:value-of select="ccs:getLocalizedName('DEFAULT_BLOCK', $userLocale)"/>
- </xsl:when>
- <xsl:otherwise>DEFAULT_BLOCK</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:element name="subFeed">
- <xsl:attribute name="name"><xsl:value-of select="$blockName"/></xsl:attribute>
- <xsl:attribute name="type">conditionalBlock</xsl:attribute>
- <atom:feed>
- <atom:id>
- <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', $blockName, ':conditionalBlock')"/>
- </atom:id>
- <atom:title>
- <xsl:value-of select="$blockTitle"/>
- </atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:author>
- <atom:name>@report_author@</atom:name>
- </atom:author>
- <atom:link rel="self" type="application/atom+xml">
- <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',$blockName,'&eltype=conditionalBlock','&v=@requestversion@')"/></xsl:attribute>
- </atom:link>
- <xsl:apply-templates select="conditionalBlockDefault/contents/*"/>
- </atom:feed>
- </xsl:element>
- <xsl:call-template name="atomVirtualEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="$blockName"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">conditionalBlock</xsl:with-param>
- <xsl:with-param name="entryIcon">conditionalblock</xsl:with-param>
- <xsl:with-param name="entryName">
- <xsl:value-of select="$blockTitle"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- <xsl:for-each select="./conditionalBlockCases/conditionalBlock">
- <xsl:variable name="blockName">
- <xsl:value-of select="concat('conditionalBlock_',../@refVariable,'_',@refVariableValue,'_',$conditionalBlocksNum)"/>
- </xsl:variable>
- <xsl:element name="subFeed">
- <xsl:attribute name="name"><xsl:value-of select="$blockName"/></xsl:attribute>
- <xsl:attribute name="type">conditionalBlock</xsl:attribute>
- <atom:feed>
- <atom:id>
- <xsl:value-of select="concat('tag:cognos.com,2007:','@report_id@/', @name, ':conditionalBlock')"/>
- </atom:id>
- <atom:title>
- <xsl:value-of select="@refVariableValue"/>
- </atom:title>
- <atom:updated>@report_updated@</atom:updated>
- <atom:author>
- <atom:name>@report_author@</atom:name>
- </atom:author>
- <atom:link rel="self" type="application/atom+xml">
- <xsl:attribute name="href"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',$blockName,'&eltype=conditionalBlock','&v=@requestversion@')"/></xsl:attribute>
- </atom:link>
- <xsl:apply-templates select="contents/*"/>
- </atom:feed>
- </xsl:element>
- <xsl:call-template name="atomVirtualEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="$blockName"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">conditionalBlock</xsl:with-param>
- <xsl:with-param name="entryIcon">conditionalblock</xsl:with-param>
- <xsl:with-param name="entryName">
- <xsl:value-of select="@refVariableValue"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="layoutComponentRef">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="concat(@name, '_REF')"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">layout_component_ref</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="CMMMap">
- <xsl:if test="@name">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryType">image</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="pieChart | paretoChart | scatterChart | polarChart | radarChart | progressiveChart | combinationChart | bubbleChart | threeDCombinationChart | threeDScatterChart | gaugeChart | mapChart | metricsChart | marimekkoChart | winLossChart | v2_combinationChart | v2_scatterChart | v2_pieChart | v2_gaugeChart | v2_matrixChart | v2_progressiveChart | v2_paretoChart | v2_bubbleChart | v2_repeaterChart | v2_bulletChart | viz">
- <xsl:if test="@name">
- <xsl:variable name="chartName">
- <xsl:choose>
- <xsl:when test="local-name()='viz'">extviz</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:value-of select="@name"/>
- </xsl:with-param>
- <xsl:with-param name="entryIcon">
- <xsl:choose>
- <xsl:when test="function-available('ccs:toLower')">
- <xsl:value-of select="ccs:toLower($chartName)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$chartName"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="entryType">chart</xsl:with-param>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="singleton">
- <xsl:call-template name="atomEntry">
- <xsl:with-param name="entryID">
- <xsl:choose>
- <xsl:when test="contents/textItem/@name">
- <xsl:value-of select="contents/textItem/@name"/>
- </xsl:when>
- <xsl:when test="@name">
- <xsl:value-of select="@name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:with-param>
- <xsl:with-param name="entryType">singleton</xsl:with-param>
- <xsl:with-param name="entryIcon">singleton</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="*">
- <!--Unknown element. Ignore-->
- <!--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:choose>
- <xsl:when test="$useLocalizedNames = 'true'">
- <xsl:choose>
- <xsl:when test="function-available('ccs:getLocalizedPartName')">
- <xsl:value-of select="ccs:getLocalizedPartName($entryID,$entryType,position(),$userLocale)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($entryType, position())"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$entryID"/>
- </xsl:otherwise>
- </xsl:choose>
- </atom:title>
- <atom:author>
- </atom:author>
- <atom:author>
- <atom:name>@report_author@</atom:name>@report_author_email@
- </atom:author>@report_contributor@@report_description@<atom:updated>@report_updated@</atom:updated>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/icon16</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$entryIcon">
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryIcon,'.gif')"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryType,'.gif')"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/icon64</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$entryIcon">
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryIcon,'_64.gif')"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryType,'_64.gif')"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/thumbnail</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:choose>
- <xsl:when test="$entryIcon">
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="function-available('ccs:uriEncodeID')">
- <xsl:value-of select="concat('@report_gateway@/rds/thumbnail/report/@report_storeid@?deficon=icon_',$entryIcon,'_64.gif&selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&v=@requestversion@')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('@report_gateway@/rds/thumbnail/report/@report_storeid@?deficon=icon_',$entryIcon,'_64.gif&selection=',$entryID,'&v=@requestversion@')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="function-available('ccs:uriEncodeID')">
- <xsl:value-of select="concat('@report_gateway@/rds/thumbnail/report/@report_storeid@?deficon=icon_',$entryType,'_64.gif&selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&v=@requestversion@')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('@report_gateway@/rds/thumbnail/report/@report_storeid@?deficon=icon_',$entryType,'_64.gif&selection=',$entryID,'&v=@requestversion@')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </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:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/reportData/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&version=LATEST','&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/reportData/report/@report_storeid@?selection=',$entryID,'&version=LATEST','&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">alternate</xsl:attribute>
- <xsl:attribute name="type">application/x-pagedldx+xml</xsl:attribute>
- <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/pagedReportData/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&version=LATEST','&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/pagedReportData/report/@report_storeid@?selection=',$entryID,'&version=LATEST','&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <cm:objectClass>reportpart</cm:objectClass>
- <cm:location>
- <xsl:value-of select="concat('@report_location@ > ', $entryID)"/>
- </cm:location>
- <d:type>
- <xsl:value-of select="$entryType"/>
- </d:type>
- <d:storeID>@report_storeid@</d:storeID>
- <d:partID>
- <xsl:value-of select="$entryID"/>
- </d:partID>
- </atom:entry>
- </xsl:template>
- <xsl:template name="atomVirtualEntry">
- <xsl:param name="entryID"/>
- <xsl:param name="entryIcon"/>
- <xsl:param name="entryType"/>
- <xsl:param name="entryName"/>
- <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), ':', $entryType)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat('tag:cognos.com,2007:@report_id@/',$entryID, ':', $entryType)"/>
- </xsl:otherwise>
- </xsl:choose>
- </atom:id>
- <atom:title>
- <xsl:value-of select="$entryName"/>
- </atom:title>
- <atom:author>
- <atom:name>@report_author@</atom:name>@report_author_email@
- </atom:author>@report_contributor@@report_description@<atom:updated>@report_updated@</atom:updated>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/icon16</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryIcon,'.gif')"/></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/icon64</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryIcon,'_64.gif')"/></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">alternate</xsl:attribute>
- <xsl:attribute name="type">application/atom+xml</xsl:attribute>
- <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&eltype=',$entryType,'&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',$entryID,'&eltype=',$entryType,'&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">alternate</xsl:attribute>
- <xsl:attribute name="type">application/x-pagedldx+xml</xsl:attribute>
- <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/pagedReportData/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&version=LATEST','&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/pagedReportData/report/@report_storeid@?selection=',$entryID,'&version=LATEST','&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <d:type>
- <xsl:value-of select="$entryType"/>
- </d:type>
- <d:storeID>@report_storeid@</d:storeID>
- <d:partID>
- <xsl:value-of select="$entryID"/>
- </d:partID>
- </atom:entry>
- </xsl:template>
- <xsl:template name="atomPageEntry">
- <xsl:param name="entryID"/>
- <xsl:param name="entryIcon"/>
- <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:author>
- <atom:name>@report_author@</atom:name>@report_author_email@
- </atom:author>@report_contributor@@report_description@<atom:updated>@report_updated@</atom:updated>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/icon16</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryIcon,'.gif')"/></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">http://www.ibm.com/xmlns/prod/cognos/rel/icon64</xsl:attribute>
- <xsl:attribute name="type">image/gif</xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="concat('@webcontent_root@/icd/feeds/images/', 'icon_',$entryIcon,'_64.gif')"/></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">alternate</xsl:attribute>
- <xsl:attribute name="type">application/atom+xml</xsl:attribute>
- <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&eltype=page','&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/atom_ds/report/@report_storeid@?selection=',$entryID,'&eltype=page','&v=@requestversion@')"/></xsl:otherwise></xsl:choose></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:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/reportData/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&version=LATEST','&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/reportData/report/@report_storeid@?selection=',$entryID,'&version=LATEST','&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <atom:link>
- <xsl:attribute name="rel">alternate</xsl:attribute>
- <xsl:attribute name="type">application/x-pagedldx+xml</xsl:attribute>
- <xsl:attribute name="href"><xsl:choose><xsl:when test="function-available('ccs:uriEncodeID')"><xsl:value-of select="concat('@report_gateway@/rds/pagedReportData/report/@report_storeid@?selection=',ccs:uriEncodeID($entryID,$hexEncodeUnderscores),'&version=LATEST','&v=@requestversion@')"/></xsl:when><xsl:otherwise><xsl:value-of select="concat('@report_gateway@/rds/pagedReportData/report/@report_storeid@?selection=',$entryID,'&version=LATEST','&v=@requestversion@')"/></xsl:otherwise></xsl:choose></xsl:attribute>
- </atom:link>
- <d:type>page</d:type>
- <d:storeID>@report_storeid@</d:storeID>
- <d:partID>
- <xsl:value-of select="$entryID"/>
- </d:partID>
- </atom:entry>
- </xsl:template>
- </xsl:stylesheet>
|