123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2016
- 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
-
- <!--
- ===============================================================================================
- Seassion Cleanup
- ===============================================================================================
- -->
- <xts:block id="logoff" type="exec" mode="interpret" processor="XSLT">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/root">
- <xts:sequence>
- <!-- Fetch configuration information required for performing logoff -->
- <!-- Delete session cookies -->
- <!-- Make a list of all the cookies to delete -->
- <xsl:variable name="deleteCookies">
- <cookies>
- <xsl:if test="/root/cookies/cookie[@name='cc_session']">
- <cookie name="cc_session"/>
- </xsl:if>
- <xsl:if test="/root/cookies/cookie[@name='viewer_session']">
- <cookie name="viewer_session"/>
- </xsl:if>
- <xsl:if test="/root/cookies/cookie[@name='CRN']">
- <cookie name="CRN"/>
- </xsl:if>
- </cookies>
- </xsl:variable>
-
- <xts:append select="/root/output/*[local-name() = 'protocolHeader']/*[local-name() = 'param' and @name = 'setSoapHeader']/*[local-name() = 'Header']/*[local-name() = 'biBusHeader']/*[local-name() = 'hdrSession']/*[local-name() = 'setCookieVars']">
- <xsl:for-each select="$deleteCookies/cookies/cookie">
- <item xsi:type="bus:setCookieVar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <name xsi:type="xsd:string"><xsl:value-of select="@name"/></name>
- <value xsi:type="xsd:string"></value>
- <maxAge xsi:type="xsd:int">-1</maxAge>
- </item>
- </xsl:for-each>
- </xts:append>
-
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="response" type="exec" mode="interpret" processor="XSLT" dependency="logoff">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xos">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="isCustomLogoffEnabled" select="/root/system/param[@name='custom-auth']/logoff[@enabled='true']"/>
- <xsl:variable name="customURL" select="normalize-space(/root/system/param[@name='custom-auth']/logoff/redirect-url)"/>
- <xsl:variable name="loggoffURL">
- <xsl:choose>
- <xsl:when test="($isCustomLogoffEnabled) and (xtsext:cafaction('issafeurl_null', $customURL) = 'true' and $customURL != '')">
- <xsl:value-of select="$customURL"/>
- </xsl:when>
- <xsl:otherwise>../</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <html>
- <head>
- <meta http-equiv="refresh" content="0; URL={$loggoffURL}"/>
- <title>Logout Redirect</title>
- </head>
- <body bgcolor="#ffffff"/>
- </html>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Debug -->
- <!-- ============================================================================= -->
- <xts:block id="debug" dependency="response" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html" condition=".[/root/env/param[@name='d'] = '1' or /root/session/param[@name='debug'] = '1']">
- <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>
|