123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2018
- 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">
- <!--
- ===============================================================================================
- formlogic_init
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
- <!--
- ===============================================================================================
- request - Cancel the conversation
- ===============================================================================================
- -->
- <xts:block id="request" dependency="formlogic_init" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='web64conversation']!='']" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:rs="http://developer.cognos.com/schemas/reportService/1" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <response>
- <send:request provider="warp" option="xml-multipart" outputHeader="true" responseEnvelope="true" affinity=".control">
- <rs:cancel xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <conversation xsi:type="bus:asynchRequest">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string(key('env-param','web64conversation')))), true())"/>
- </xts:transform>
- </conversation>
- </rs:cancel>
- </send:request>
- </response>
- </xts:append>
- <xts:append>
- <conversationStatus>
- <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name()='details']/*[local-name()='item' and contains(@*[local-name()='type'], 'asynchDetailReportStatus')]/*[local-name()='status']"/>
- </conversationStatus>
- <resultStatus>
- <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name()='status']"/>
- </resultStatus>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- unpackAdminState - Replace the current environment with the calling environment
- ===============================================================================================
- -->
- <xts:block id="unpackAdminState" type="exec" mode="interpret" processor="XSLT" dependency="request" condition=".[/root/env/param[@name='adminState']!='']">
- <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="xsl">
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:replace select="/root/env">
- <env>
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='adminState']))), true())"/>
- </xts:transform>
- </env>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- resetClearedPrompts - This block resets the value of environment variable cleared_prompts
- ===============================================================================================
- -->
- <xts:block id="resetClearedPrompts" type="exec" mode="interpret" processor="XSLT" dependency="unpackAdminState">
- <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="xsl">
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/root">
- <!-- need to reset the value of cleared_prompts because it is set to false as soon as collect is called. This
- ensures that it's back to the original value if cancel is pressed -->
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="key('env-param', 'parameterDescription')=''">
- <xts:replace select="/root/env/param[@name='cleared_prompts']">
- <param name="cleared_prompts">true</param>
- </xts:replace>
- </xsl:when>
- <xsl:otherwise>
- <xts:replace select="/root/env/param[@name='cleared_prompts']">
- <param name="cleared_prompts">false</param>
- </xts:replace>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- cancelForm - This block generates all the hidden inputs needed in the cancel form
- ===============================================================================================
- -->
- <xts:block id="cancelForm" type="exec" mode="output" processor="XSLT" dependency="resetClearedPrompts" mimeType="text/html" contentId="cancelInputs" partId="1" path="/portal/iPrompting/page-parts/cancel.xslt">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- redirect - redirect the browser
- ===============================================================================================
- -->
- <xts:block id="render-page" type="exec" mode="interpret" processor="XSLT" dependency="cancelForm">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xsl xos pf dp xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="key('env-param', 'm')"/>
- <pf:variables/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:replace select="/root/output/*[local-name() = 'part']">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{local-name(/root/command/*)}Response" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
- <status>
- <xsl:choose>
- <xsl:when test="/root/conversationStatus!=''">
- <xsl:value-of select="/root/conversationStatus"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/resultStatus"/>
- </xsl:otherwise>
- </xsl:choose>
- </status>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <dp:page longTitle="$product_name" getRidOfDoctype="true()">
- <dp:meta>
- <pf:meta/>
- </dp:meta>
- <form name="pform" method="post" action="{$gateway}">
- <!-- always copy in the bottomRow content -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'cancelInputs']"/>
- </form>
- <script language="javascript">
- function init()
- {
- <xsl:choose>
- <xsl:when test="/root/env/param[starts-with(@name,'stack_')] and ( not(/root/command/*/*[local-name()='ps_nav_op']) or /root/command/*/*[local-name()='ps_nav_op'] = 'pop' or /root/command/*/*[local-name()='ps_nav_op'] = 'stack_down' )">
- document.pform.ps_nav_op.value = 'pop';
- <xsl:choose>
- <xsl:when test="/root/command/*/*[local-name()='returnMorphlet'] != ''">
- document.pform.m.value = '<xsl:value-of select="/root/command/*/*[local-name()='returnMorphlet']"/>';
- </xsl:when>
- <xsl:when test="key('env-param','step_options_visited')='true'">
- document.pform.m.value = '<xsl:value-of select="xtsext:javascriptencode(string(/root/command/*/redirect))"/>';
- </xsl:when>
- <xsl:otherwise>
- document.pform.m.value = 'portal/runWithOptions/report.xts';
- </xsl:otherwise>
- </xsl:choose>
- document.pform.submit();
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="/root/command/*/*[local-name()='returnMorphlet'] != ''">
- document.pform.m.value = '<xsl:value-of select="/root/command/*/*[local-name()='returnMorphlet']"/>';
- document.pform.submit();
- </xsl:when>
- <xsl:when test="/root/env/param[@name='visited_run_options_property']">
- document.pform.m.value = 'portal/properties_run_options.xts';
- document.pform.submit();
- </xsl:when>
- <xsl:otherwise>
- location.href = document.pform.backURL.value;
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- }
- </script>
- </dp:page>
- </xos:entityBody>
- </xos:part>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|