123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2012
- 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).
- -->
- <!--
- Contains all the logic to initialize the input DOM for the fragment
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xts xtsext">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <!-- if we have state information, then unpack it -->
- <xsl:if test="/root/env/param[@name='frag-state'] != ''">
- <xts:append select="/root/env">
- <xts:transform src="/cogadmin/transforms/merge_state_and_env.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/env"/>
- <state>
- <xsl:value-of select="xtsext:base64decode(string(/root/env/param[@name = 'frag-state']), true())" disable-output-escaping="yes"/>
- </state>
- </root>
- </xts:transform>
- </xts:append>
- </xsl:if>
- <!-- If this request is not carrying a caf contextid and caf_extendedContextId is true then make sure it does from now on. -->
- <xsl:variable name="passport" select="string(/root/credential/param[@name='CAM']/*[local-name()='CAM']/*[local-name()='CAMPassport']/*[local-name()='id'])"/>
- <xsl:if test="not(/root/env/param[@name='ui.cafcontextid']) and $passport != '' and xtsext:cafaction('get_extendedcontextid', '') = 'true'">
- <xts:append select="/root/env">
- <param name="ui.cafcontextid"><xsl:value-of select="xtsext:cafaction(concat('get_contextid_settemplatename_fragmentinitxslt_setcomponent_ps_setpassportid_', $passport), '')"/></param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|