123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <?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).
- -->
- <!-- Get the Theme properties description from Upfront -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <xts:block id="getThemeProperties" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="user-prefs" match="/root/user/param" use="@name"/>
- <xsl:template match="/">
- <xsl:variable name="encoding">
- <xsl:choose>
- <xsl:when test="/root/system/param[@name='series7']/encoding and /root/system/param[@name='series7']/encoding != ''">
- <xsl:value-of select="/root/system/param[@name='series7']/encoding"/>
- </xsl:when>
- <xsl:otherwise>UTF-8</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append>
- <upfThemeProperties>
- <xts:transform src="transforms/upfront/post-process_tp.xslt" processor="XSLT">
- <xts:request protocol="COGX" href="cogx://upfront" faultBlock="cogx-fault">
- <xts:param name="host"><xsl:value-of select="/root/system/param[@name='series7']/host"/></xts:param>
- <xts:param name="port"><xsl:value-of select="/root/system/param[@name='series7']/port"/></xts:param>
- <xts:param name="encoding"><xsl:value-of select="$encoding"/></xts:param>
- <envelope xmlns="http://developer.cognos.com/schemas/cogx/">
- <routing xmlns="http://developer.cognos.com/schemas/cogx/">
- <apiversion>2.0</apiversion>
- <dispatcher did="cogx://upfront:8030"/>
- <sender component="CC" version="1.0" msgversion="3.0"/>
- <target>upfront</target>
- </routing>
- <command xmlns="http://developer.cognos.com/schemas/cogx/">
- <apiversion>3.0</apiversion>
- <sender component="CC" version="1.0" msgversion="3.0"/>
- <messageattribute>
- <ticket>
- <xsl:value-of select="/root/cookies/cookie[@name='AS_TICKET']"/>
- </ticket>
- <language><xsl:value-of select="key('user-prefs', 'productLocale')"/></language>
- <locale><xsl:value-of select="key('user-prefs', 'contentLocale')"/></locale>
- <timezoneid><xsl:value-of select="key('user-prefs', 'timeZoneID')"/></timezoneid>
- <!-- it is OK to hard-code this to "ie" since the file we are requesting is browser-neutral -->
- <browser>ie</browser>
- </messageattribute>
- <message>
- <getTemplate xmlns="http://developer.cognos.com/schemas/upfront/">
- <Template><xsl:value-of select="translate(string(/root/env/param[@name = 'provider']),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>_themeproperties.xml</Template>
- </getTemplate>
- </message>
- </command>
- </envelope>
- </xts:request>
- </xts:transform>
- </upfThemeProperties>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Fault handler for cogx -->
- <!-- ============================================================================= -->
- <xts:block id="cogx-fault" type="fault" path="portal/faults/cogx-fault.xslt" processor="XSLT"/>
-
- <!-- Output -->
- <!-- ============================================================================= -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="getThemeProperties">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/root">
- <!-- Get the target actions template. If no actions template is specified then default to the generic one -->
- <xsl:variable name="target_template">
- <xsl:choose>
- <xsl:when test="/root/upfThemeProperties/Provider/Property[./Name = 'Actions']/Value != ''">
- <xsl:value-of select="/root/upfThemeProperties/Provider/Property[./Name = 'Actions']/Value"/>
- </xsl:when>
- <xsl:otherwise>ni_actions.utml</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Build the redirection URL -->
- <xsl:variable name="redirect-url">
- <xsl:value-of select="/root/system/param[@name='series7']/gateway"/>
- <xsltext/>?xmlcmd=<GetPage><Template><xsl:value-of select="$target_template"/></Template></GetPage><xsl:text/>
- <xsl:text/>&id=<xsl:value-of select="/root/env/param[@name = 'id']"/><xsltext/>
- <xsl:text/>&LA=<xsl:value-of select="/root/env/param[@name = 'LA']"/><xsl:text/>
- <xsl:text/>&LO=<xsl:value-of select="/root/env/param[@name = 'LO']"/><xsl:text/>
- <xsl:text/>&back=<xsl:value-of select="xtsext:urlencode(string(/root/env/param[@name = 'back']))"/><xsl:text/>
- </xsl:variable>
- <html lang="{/root/user/param[@name='productLocale']}">
- <head>
- <meta http-equiv="refresh" content="0; URL={xtsext:protect(string($redirect-url),'none','s7url','s7url')}"/>
- </head>
- <body/>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--<xts:block id="debug" type="exec" mode="output" dependency="getThemeProperties" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <dbg:templates/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>-->
-
- </xts:morphlet>
|