123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2013
- 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).
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" encoding="UTF-8" indent="yes" />
-
- <!-- Load the old portal's system.xml from the baltic install -->
- <xsl:variable name="portal_crn_system" select="document('portal/system.xml')/system"/>
- <xsl:variable name="system_version">
- <xsl:choose>
- <xsl:when test="string(/system/@version) = ''">
- <xsl:text>2.0</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/system/@version"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xsl:comment>
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2013
- 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).
- </xsl:comment>
- <system version="4.4">
- <!-- The upgrade templates add new params that are in the current system but were never in the system being upgraded from.
- -->
- <xsl:if test="$system_version < 2.1">
- <xsl:call-template name="upgrade_from_2_0"/>
- </xsl:if>
- <xsl:if test="$system_version < 3.0">
- <xsl:call-template name="upgrade_from_2_0_to_2_2"/>
- </xsl:if>
- <xsl:if test="$system_version < 3.1">
- <xsl:call-template name="upgrade_from_2_0_to_3_0"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.0">
- <xsl:call-template name="upgrade_from_2_0_to_4_0"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.3">
- <xsl:call-template name="upgrade_from_2_0_to_4_3"/>
- </xsl:if>
- <xsl:apply-templates select="system/child::node()"/>
- </system>
- </xsl:template>
- <!-- Remove deprecated params. This is safe to be done unconditionally for all upgrade paths. -->
- <xsl:template match="param[@name='default-skin']"/>
- <xsl:template match="param[@name='webcontent']"/>
- <xsl:template match="param[@name='skin-root']"/>
- <xsl:template match="param[@name='pat-url']"/>
- <xsl:template match="param[@name='defaultPortalPreferences']/pref[@name='refresh']"/>
- <!-- Ensure param[@name='series7']/encoding has a value. If no value is present, a default of UTF-8 is used.
- This is safe to be done unconditionally for all upgrade paths -->
- <xsl:template match="param[@name='series7']/encoding">
- <encoding>
- <xsl:choose>
- <xsl:when test="string(.) != ''">
- <xsl:value-of select="string(.)"/>
- </xsl:when>
- <xsl:otherwise>UTF-8</xsl:otherwise>
- </xsl:choose>
- </encoding>
- </xsl:template>
- <!-- =================================================================================== -->
- <xsl:template name="upgrade_from_2_0">
- <xsl:if test="not(/system/param[@name='COGNOSHome'])">
- <xsl:comment>This is the query string required to redirect to the users home</xsl:comment>
- <param name="COGNOSHome">b_action=xts.run&m=portal/main.xts</param>
- </xsl:if>
- </xsl:template>
-
- <!-- =================================================================================== -->
- <xsl:template name="upgrade_from_2_0_to_2_2">
- <xsl:comment>Supported document formats </xsl:comment>
- <param name="documentFormats">
- <format id="application/vnd.coc-wd" extension="doc"/>
- <format id="application/vnd.coc-xl" extension="xls"/>
- <format id="application/vnd.coc-pp" extension="ppt"/>
- <format id="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" extension="xlsx"/>
- <format id="application/vnd.openxmlformats-officedocument.presentationml.presentation" extension="pptx"/>
- <format id="application/vnd.openxmlformats-officedocument.wordprocessingml.document" extension="docx"/>
- <format id="application/vnd.coc-xl.2007.macroEnabled" extension="xlsm"/>
- <format id="application/vnd.coc-wd.2007.macroEnabled" extension="docm"/>
- <format id="application/vnd.coc-pp.2007.macroEnabled" extension="pptm"/>
- <format id="application/vnd.ms-excel.sheet.binary.macroEnabled.12" extension="xlsb"/>
- <format id="application/vnd.ms-excel.sheet.macroEnabled.12" extension="xlsm"/>
- </param>
- </xsl:template>
-
- <!-- =================================================================================== -->
- <xsl:template name="upgrade_from_2_0_to_3_0">
- <param name="capabilities">
- <capability name="canUseEventStudio" browser="ie moz"/>
- <capability name="canUseAnalysisStudio" browser="ie moz"/>
- <capability name="canUseControllerStudio" browser="ie"/>
- <capability name="canUseMetricsManager" browser="ie moz"/>
- <capability name="canUseMetricsManagerAdministration" browser="ie moz"/>
- <capability name="canUseQueryStudio" browser="ie moz"/>
- <capability name="canUseAdaptiveAnalyticsAdministration" browser="ie moz"/>
- <capability name="canUseReportStudio" browser="ie moz"/>
- <capability name="canUseDashboardViewer" browser="ie moz chrome safari"/>
- <capability name="canUsePowerPlay" browser="ie moz"/>
- <capability name="canUseAdministrationPortal" browser="ie moz"/>
- <capability name="canUseMyActivitiesAndSchedule" browser="ie moz"/>
- <capability name="canUseMyInbox" browser="ie moz"/>
- <capability name="canUseAdaptiveAnalytics" browser="ie moz"/>
- <capability name="canUseEV" browser="ie moz"/>
- </param>
- <param name="cognosNowCubeFileSuffix">/now/RelXMLAProvider.jsp</param>
- <param name="integerMaximumValue">2147483647</param>
- <!-- was missed in 3.0 (present in all other versions) so if upgrading from 3.0 need to add
- <xsl:if test="not(/system/param[@name='pdfDrilBaltic'])">-->
- <xsl:comment> To enable drillthrough support for Baltic saved PDF add the following pdfDrilBaltic param and set it to true
- param name="pdfDrilBaltic">true</xsl:comment>
- </xsl:template>
- <!-- =================================================================================== -->
-
- <xsl:template name="upgrade_from_2_0_to_4_3">
- <xsl:comment>Set this to false to force CC to launch active reports as standalone application (10.2 default), not in expanded mode.</xsl:comment>
- <param name="allowExpandedMHT">true</param>
- <xsl:comment>Set this to false to show the expanded active report in the same window as cognos connection. Ignored if allowExpandedMHT is false</xsl:comment>
- <param name="expandMHTnewWindow">true</param>
- </xsl:template>
-
- <!-- =================================================================================== -->
- <xsl:template name="upgrade_from_2_0_to_4_0">
- <xsl:comment> Custom login/logoff configurations</xsl:comment>
- <param name="custom-auth">
- <logoff enabled="false">
- <xsl:comment> URL to direct to upon logoff. Note: the 'redirect-url' url specified is subject to validation at runtime </xsl:comment>
- <redirect-url></redirect-url>
- </logoff>
- <logon enabled="false">
- <xsl:comment>
- At runtime, template name is constructed as base-template-name_'productLocale'.
- If base-template-name_'productLocale' does not exist, base-template-name is used.
- Note 1: Template filename extension is expected to be .xhtml
- Note 2: Template is relative to ../webcontent/ps/login
- </xsl:comment>
- <base-template-name></base-template-name> <xsl:comment>e.g.: my_customtemplate_1 </xsl:comment>
- </logon>
- </param>
- </xsl:template>
-
- <!-- =================================================================================== -->
- <!-- Update reportFormats (attributes and objects) ================================================= -->
-
- <xsl:template match="param[@name='reportFormats']/format[@id='HTML']">
- <format>
- <xsl:choose>
- <xsl:when test="$system_version < 4.1">
- <xsl:copy-of select="@*[name()!='downloadable']"/>
- <xsl:if test="@*[name()='downloadable' and string(.)!='false']">
- <xsl:copy-of select="@*[name()='downloadable']"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise><xsl:copy-of select="@*"/></xsl:otherwise>
- </xsl:choose>
- </format>
- </xsl:template>
-
- <xsl:template match="param[@name='reportFormats']/format[@id='XHTML']">
- <format>
- <xsl:choose>
- <xsl:when test="$system_version < 4.1">
- <xsl:copy-of select="@*[name()!='downloadable']"/>
- <xsl:if test="@*[name()='downloadable' and string(.)!='false']">
- <xsl:copy-of select="@*[name()='downloadable']"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise><xsl:copy-of select="@*"/></xsl:otherwise>
- </xsl:choose>
- </format>
- </xsl:template>
-
- <xsl:template match="param[@name='reportFormats']/format[@id='singleXLS']">
- <format>
- <xsl:choose>
- <xsl:when test="$system_version < 4.0">
- <attribute name="id">singleXLS</attribute>
- <attribute name="browserHide">safari</attribute>
- <attribute name="downloadable">true</attribute>
- <attribute name="appMode"/> <!--Updating appMode to empty-->
- <attribute name="extension">xls</attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="@*"/>
- </xsl:otherwise>
- </xsl:choose>
- </format>
- </xsl:template>
- <xsl:template match="param[@name='reportFormats']/format[@id='XLS']">
- <format>
- <xsl:choose>
- <xsl:when test="$system_version < 4.0">
- <attribute name="id">XLS</attribute>
- <attribute name="browserHide">safari moz other</attribute>
- <attribute name="downloadable">false</attribute>
- <attribute name="appMode"/> <!--Updating appMode to empty-->
- <attribute name="cafaction">true</attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="@*"/>
- </xsl:otherwise>
- </xsl:choose>
- </format>
- </xsl:template>
-
- <xsl:template match="param[@name='reportFormats']/format[@id='PDF']">
- <format>
- <xsl:copy-of select="@*"/>
- <xsl:if test="$system_version < 3.0">
- <attribute name="extension">pdf</attribute>
- </xsl:if>
- </format>
- </xsl:template>
- <xsl:template match="param[@name='reportFormats']/format[@id='XLWA']">
- <format>
- <xsl:copy-of select="@*"/>
- <xsl:if test="$system_version < 3.0">
- <attribute name="extension">xls</attribute>
- <attribute name="mime">application/vnd.ms-excel</attribute>
- </xsl:if>
- </format>
- </xsl:template>
-
- <xsl:template match="param[@name='reportFormats']/format[@id='XML']">
- <format>
- <xsl:copy-of select="@*"/>
- <xsl:if test="$system_version < 3.0">
- <attribute name="extension">xml</attribute>
- </xsl:if>
- </format>
- </xsl:template>
-
- <xsl:template match="param[@name='reportFormats']/format[@id='CSV']">
- <format>
- <xsl:copy-of select="@*"/>
- <xsl:if test="$system_version < 3.0">
- <attribute name="extension">csv</attribute>
- </xsl:if>
- </format>
- </xsl:template>
-
- <xsl:template match="param[@name='reportFormats']">
- <param name="reportFormats">
- <xsl:if test="$system_version < 4.2">
- <format id="xlsxData" browserHide="safari" downloadable="true" appMode="basic adv rv" extension="xlsx" />
- </xsl:if>
- <xsl:if test="$system_version < 3.0">
- <format id="spreadsheetML" browserHide="safari" downloadable="true" appMode="basic adv rv" extension="xlsx"/>
- </xsl:if>
- <xsl:apply-templates/>
- </param>
- </xsl:template>
- <!-- End of update reportFormats (attributes and objects) ================================================= -->
-
- <!-- =========== Update capabilities =============================================================== -->
- <!-- This will only catch capabilities if they are in the system xml -->
- <xsl:template match="param[@name='capabilities']">
- <param name="capabilities">
- <xsl:if test="$system_version >= 4.3">
- <xsl:copy-of select="*"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.3">
- <xsl:copy-of select="*[@name!='canUseReportStudio']"/>
- <capability name="canUseReportStudio" browser="ie moz chrome safari"/>
- </xsl:if>
- <!-- need to add moz to browser for canUseEV and chrome|safari for dashboard for certain versions -->
- <xsl:if test="$system_version < 4.2">
- <xsl:copy-of select="*[@name!='canUseEV' and @name!='canUseDashboardViewer']"/>
- <capability name="canUseDashboardViewer" browser="ie moz chrome safari"/>
- <capability name="canUseEV" browser="ie moz"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.2">
- <capability name="canUsePowerPlay" browser="ie moz"/>
- <capability name="canUseCognosInsight" browser="ie moz chrome safari"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.1">
- <capability name="canUseReportStudio" browser="ie moz"/>
- <capability name="canUseAdministrationPortal" browser="ie moz"/>
- <capability name="canUseMyActivitiesAndSchedule" browser="ie moz"/>
- <capability name="canUseMyInbox" browser="ie moz"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.0">
- <capability name="canUseAdaptiveAnalytics" browser="ie moz"/>
- </xsl:if>
- </param>
- </xsl:template>
- <xsl:template match="param[@name='documentFormats']">
- <param name="documentFormats">
- <xsl:copy-of select="*"/>
- <xsl:if test="$system_version < 4.0">
- <format id="application/vnd.coc-xl.2007.macroEnabled" extension="xlsm"/>
- <format id="application/vnd.coc-wd.2007.macroEnabled" extension="docm"/>
- <format id="application/vnd.coc-pp.2007.macroEnabled" extension="pptm"/>
- </xsl:if>
- <xsl:if test="$system_version < 4.1">
- <!-- New for 4.1 2010 macro-enabled -->
- <format id="application/vnd.ms-excel.sheet.binary.macroEnabled.12" extension="xlsb"/>
- <format id="application/vnd.ms-excel.sheet.macroEnabled.12" extension="xlsm"/>
- </xsl:if>
- </param>
- </xsl:template>
-
- <!-- ======================================================================================================================= -->
- <xsl:template match="param[@name='CCHome']">
- <xsl:choose>
- <xsl:when test="$system_version < 2.1">
- <param name="CCHome">b_action=xts.run&m=portal/cc.xts</param>
- </xsl:when>
- <xsl:otherwise>
- <param>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </param>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!-- Copy everything else -->
- <xsl:template match="* | comment()">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|