123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- +===================================================================+
- | Licensed Materials - Property of IBM
- | BI and PM: prmt
- | (C) Copyright IBM Corp. 2002, 2019
- |
- | US Government Users Restricted Rights - Use, duplication or
- | disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- |
- +===================================================================+
- -->
- <xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml">
- <xts:block id="parseURL" path="rv/logicsheets/parseURL.xslt" type="exec" processor="XSLT" mandatory="false"/>
- <xts:block id="init" mode="interpret" dependency="parseURL" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl send cml cm SOAP-ENV xtsext">
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='run.attachmentEncoding']"/>
- <xts:append select="root/env">
- <param name="run.attachmentEncoding">
- <xsl:text/>base64<xsl:text/>
- </param>
- </xts:append>
- <xsl:if test="/root/env/param[@name='htmlFragment'] != ''">
- <xts:delete select="/root/env/param[@name='ui.action' or @name='htmlFragment']"/>
- <xts:append select="/root/env">
- <param name="ui.action">forward</param>
- </xts:append>
- <xts:append select="/root/header/*[local-name()='biBusHeader']/*[local-name()='hdrSession']/*[local-name()='formFieldVars']">
- <item>
- <name xsi:type="xsd:string">_promptControl</name>
- <value xsi:type="xsd:string">reprompt</value>
- </item>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- copy-prompts - If we are coming from a prompt page (method = forward) remember the prompt values then drop them from the
- environment parameters. This assumes that all parameters that begin with p_ belong to prompts.
- ===============================================================================================
- -->
- <xts:block id="copy-prompts" mode="interpret" processor="XSLT" type="exec" dependency="parseURL" condition=".[not(contains(string(/root/env/param[@name='ui.action']), 'Page')) and (/root/env/param[starts-with(@name, 'p_')] or (/root/env/param[@name='ui.action']='execute' and /root/env/param[@name='session_prompts']))]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl send cml cm SOAP-ENV xtsext">
- <xsl:template match="/">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='session_prompts'] and /root/env/param[@name='ui.action']='execute'">
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='session_prompts'])), true())" disable-output-escaping="yes"/>
- </xts:append>
- </xsl:when>
- <xsl:otherwise>
- <xts:append>
- <PromptValues>
- <xsl:for-each select="/root/env/param[starts-with(@name, 'p_')]">
- <PromptValue name="{substring-after(@name,'_')}">
- <xsl:choose>
- <xsl:when test="/root/http/param[@name='REQUEST_METHOD']='GET'">
- <xsl:value-of select="." disable-output-escaping="no"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </PromptValue>
- </xsl:for-each>
- </PromptValues>
- </xts:append>
- <xts:append select="/root">
- <RvCachedPrompts/>
- </xts:append>
- <xts:append select="/root/RvCachedPrompts">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='session_prompts']">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='session_prompts'])), true())" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <PromptValues/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- <xsl:for-each select="/root/env/param[starts-with(@name, 'p_')]">
- <xsl:variable name="promptValueName">
- <xsl:value-of select="substring-after(@name,'p_')"/>
- </xsl:variable>
- <xts:delete select="/*[local-name()='root']/*[local-name()='RvCachedPrompts']/*[local-name()='PromptValues']/*[local-name()='PromptValue'][@name="{$promptValueName}"]"/>
- <xts:append select="/root/RvCachedPrompts/PromptValues">
- <PromptValue name="{substring-after(@name,'p_')}">
- <xsl:choose>
- <xsl:when test="/root/http/param[@name='REQUEST_METHOD']='GET'">
- <xsl:value-of select="." disable-output-escaping="no"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </PromptValue>
- </xts:append>
- </xsl:for-each>
- <xts:delete select="/root/env/param[starts-with(@name, 'p_')]"/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- execute - call the report server, unless the method is "view".
- ===============================================================================================
- -->
- <xts:block id="execute" type="exec" mode="interpret" processor="XSLT" dependency="init copy-prompts set-conversation" condition=".[ contains( ' back cancel forward release wait collectParameterValuesSpecification ', concat(' ', /root/env/param[@name='ui.action'], ' ') )]" mandatory="false">
- <xts:logicsheet path="prompting/soaplogic.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/prmt/soaplogic/" exclude-result-prefixes="xsl xtsext xos cm bus SOAP-ENV xsi">
- <sl:soaplogic/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="affinity">
- <xsl:choose>
- <xsl:when test="key('env-param','ui.action')='forward'">.high</xsl:when>
- <xsl:when test="key('env-param','ui.action')='back'">.high</xsl:when>
- <xsl:when test="key('env-param','ui.action')='cancel'">.control</xsl:when>
- <xsl:when test="key('env-param','ui.action')='getOutput'">.absolute</xsl:when>
- <xsl:when test="key('env-param','ui.action')='release'">.absolute</xsl:when>
- <xsl:when test="key('env-param','ui.action')='wait'">.absolute</xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/root">
- <xts:sequence>
- <xsl:variable name="currentTracking">
- <xsl:if test="key('env-param', 'tracking')">
- <xsl:value-of select="key('env-param', 'tracking')"/>
- </xsl:if>
- </xsl:variable>
- <xsl:if test="key('env-param', 'tracking')">
- <xts:delete select="/root/env/param[@name='tracking']"/>
- </xsl:if>
- <xts:append>
- <response>
- <xts:request href="bus://dispatcher" protocol="BUS" responseEnvelope="true" option="xml-multipart" outputHeader="true">
- <xsl:attribute name="soapAction"><xsl:text/>http://www.ibm.com/xmlns/prod/cognos/reportService/202004/<xsl:value-of select="$affinity"/></xsl:attribute>
- <xsl:if test="key('env-param', 'ui.action') != 'execute'">
- <xsl:attribute name="outputHeader">true</xsl:attribute>
- </xsl:if>
- <SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader">
- <xsl:choose>
- <xsl:when test="$currentTracking!=''">
- <bus:tracking>
- <xsl:choose>
- <xsl:when test="starts-with(string($currentTracking),'<')"><xsl:value-of select="$currentTracking" disable-output-escaping="yes"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string($currentTracking)), true())" disable-output-escaping="yes"/></xsl:otherwise>
- </xsl:choose>
- </bus:tracking>
- <xsl:apply-templates select="header/bus:biBusHeader/*[local-name()!='tracking']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="header/bus:biBusHeader/*"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="key('env-param', 'routingServerGroup') and key('env-param', 'routingServerGroup') != ''">
- <!-- we only set the routing if it is passed in to us, we don't go searching for it -->
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param', 'routingServerGroup')"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <xsl:element name="{key('env-param', 'ui.action')}" namespace="http://developer.cognos.com/schemas/reportService/1">
- <xsl:choose>
- <xsl:when test="key('env-param','ui.action')='wait'">
- <bus:conversation xsi:type="bus:asynchRequest" xsi:nil="true"/>
- <parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]"/>
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'ui.conversation') != ''">
- <bus:conversation xsi:type="bus:asynchRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_setflag_optionalunwrap_settemplatename_promptDataSource_settemplateid_execute', string(key('env-param', 'ui.conversation'))), true())" disable-output-escaping="yes"/>
- </bus:conversation>
- <xsl:if test="key('env-param', 'ui.action') != 'release'">
- <xsl:call-template name="SetParameters"/>
- <xsl:choose>
- <xsl:when test="contains( ' back cancel forward wait getOutput ', concat(' ', key('env-param','ui.action'), ' ') )">
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="SetOptions" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="starts-with(key('env-param','specification'),'<report')">
- <specification xsi:type="bus:reportServiceReportSpecification">
- <bus:value xsi:type="bus:specification">
- <xsl:value-of select="key('env-param','specification')"/>
- </bus:value>
- </specification>
- </xsl:when>
- <xsl:when test="starts-with(key('env-param','specification'),'<Meta')">
- <specification xsi:type="bus:reportServiceMetadataSpecification">
- <bus:value xsi:type="bus:specification">
- <xsl:value-of select="key('env-param','specification')"/>
- </bus:value>
- </specification>
- </xsl:when>
- <xsl:otherwise>
- <specification xsi:type="bus:queryFrameworkSpecification">
- <bus:value xsi:type="bus:specification">
- <xsl:value-of select="key('env-param','specification')"/>
- </bus:value>
- </specification>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="key('env-param', 'ui.action') != 'release'">
- <xsl:choose>
- <xsl:when test="key('env-param', 'parameterValues') != ''">
- <parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]">
- <xsl:choose>
- <!-- If the parameter starts with a '<', it means it wasn't XML encoded first. -->
- <xsl:when test="starts-with(key('env-param', 'parameterValues'), '<')">
- <xsl:value-of select="key('env-param', 'parameterValues')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:xmldecode(string(key('env-param', 'parameterValues')))" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </parameterValues>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="SetParameters"/>
- </xsl:otherwise>
- </xsl:choose>
- <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <item xsi:type="bus:runOptionString">
- <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
- <bus:value xsi:type="xsd:string">HTML</bus:value>
- </item>
- </bus:options>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- don't include superfluous fields in SOAP Envelope -->
- <xsl:template match="*[local-name()='formFieldVars']/item[name='ui.spec' or name='ui.conversation' or name='previousConversation' or name='cancelStack']"/>
- <!-- used to copy the bus header stuff - see "apply-templates" above. -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getOutput - Special case to handle responseReady.
- With responseReady, we just need to call getOutput to get the actual output, so do it here instead of bouncing through the browser .
- ===============================================================================================
- -->
- <xts:block id="getOutput" type="exec" dependency="execute" mode="interpret" processor="XSLT" condition=".[/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name() = 'details']/*[local-name() = 'item']/*[local-name() = 'status'] = 'responseReady']" mandatory="false" nodelist="header, env, response">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="xsl xts xos cm bus SOAP-ENV xsi">
- <xsl:output method="xml"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:replace select="/root/response">
- <!-- replace the existing response -->
- <response>
- <xts:request href="bus://dispatcher" protocol="BUS" responseEnvelope="true" outputHeader="true" option="xml-multipart"
- soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/202004/.absolute">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader">
- <xsl:copy-of select="/root/response/*[local-name()='Envelope']/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']"/>
- <xsl:apply-templates select="header/*[local-name()='biBusHeader']/*[local-name()!='tracking']"/>
- <xsl:if test="key('env-param', 'routingServerGroup') and key('env-param', 'routingServerGroup') != ''">
- <!-- we only set the routing if it is passed in to us, we don't go searching for it -->
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param', 'routingServerGroup')"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <xsl:element name="getOutput" namespace="http://developer.cognos.com/schemas/reportService/1">
- <bus:conversation xsi:type="bus:asynchRequest" xsi:nil="true"/>
- <parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]"/>
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]"/>
- </xsl:element>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- <!-- don't include superfluous fields in Envelope -->
- <xsl:template match="*[local-name()='formFieldVars']/item[name='ui.spec' or name='ui.conversation' or name='previousConversation' or name='cancelStack']"/>
- <!-- used to copy the bus header stuff - see "apply-templates" above. -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- wait - This block generates the "please wait" message
- ===============================================================================================
- -->
- <xts:block id="wait" type="exec" mode="output" processor="XSLT" dependency="init getOutput execute" mimeType="text/html" contentId="wait" partId="1" condition=".[ /root/env/param[@name='ui.action']!='drillThru' and
- ( /root/response/*/*/*/*/*[local-name() = 'status'] = 'working' or
- /root/response/*/*/*/*/*[local-name() = 'status'] = 'stillWorking') ]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.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:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" exclude-result-prefixes="xsl xos pf mt mf xtsext cf cp bus xts dp SOAP-ENV">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/root">
- <html>
- <head>
- <META http-equiv="Content-Script-Type" content="text/javascript"/>
- <link rel="stylesheet" type="text/css" href="{$skin_root}/portal/default.css"/>
- <link rel="stylesheet" type="text/css" href="{$skin_root}/fonts.css"/>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/prompting/pds.js"></script>
- <script type="text/javascript">
- function submitForm()
- {
- setTimeout("document.formWarpRequest.submit()", 1);
- }
- function cancel()
- {
- F_pdsCallback(
- {"state":"Cancel","clientContext":"<xsl:value-of select="xtsext:javascriptencode(key('env-param', 'clientContext'))"/>"<xsl:text/>
- <xsl:if test="key('env-param', 'ccs_cbdata')">
- <xsl:text/>,"ccs_cbdata":"<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_cbdata')))"/>"<xsl:text/>
- </xsl:if>
- <xsl:text/>},
- "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_invoke')))"/>"
- );
- <xsl:if test="key('env-param', 'newWindow') = '1' or key('env-param', 'newWindow') = 'true'">
- window.close();
- </xsl:if>
- }
- </script>
- </head>
- <body onload="submitForm();">
- <br/>
- <br/>
- <br/>
- <br/>
- <div style="text-align:center;">
- <table cellpadding="0" cellspacing="0" style="width:145px; border-width:0px; margin:0px auto;">
- <!--if the current method is current page, and we've received a wait response, we don't want to give the user any delivery or cancel options-->
- <tr>
- <td style="width:47%; margin:0px auto;">
- <img src="{$brand_images}progress.gif" style="border:0px; vertical-align:middle; width:48px; height:48px;" name="progress"/>
- </td>
- <td class="tableText" style="width:53%; text-align:center; white-space:nowrap;">
- <xts:string id="PROMPT_RUNNING"/>
- <br/>
- <xts:string id="RV_PLEASE_WAIT"/>
- </td>
- </tr>
- <tr>
- <td colspan="2" style="padding-top: 10px; padding-left: 5px;">
- <table style="margin:0px auto; padding-left:10px;">
- <dp:button>
- <a href="javascript:cancel()">
- <dp:buttonText>
- <xts:string id="CANCEL"/>
- </dp:buttonText>
- </a>
- </dp:button>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <form action="{$gateway}" name="formWarpRequest" id="formWarpRequest" method="post" style="height:100%;margin:0px">
- <xsl:attribute name="onsubmit">if((typeof promptButtonOK).match(/^function$/i)){promptButtonOK();return false;} else if((typeof execute).match(/^function$/i)){execute();return false;}</xsl:attribute>
- <input type="hidden" name="m" value="{key('env-param', 'm')}"/>
- <input type="hidden" name="b_action" value="xts.run"/>
- <input type="hidden" name="run.xslURL" value="sa.xsl"/>
- <input type="hidden" name="ui.action" value="wait"/>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">lang</xsl:with-param>
- </xsl:call-template>
- <input type="hidden" name="ui.object" value="{key('env-param', 'ui.object')}"/>
- <input type="hidden" name="ui.backURL" value="{key('env-param', 'ui.backURL')}"/>
- <input type="hidden" name="ui.errURL" value="{key('env-param', 'ui.errURL')}"/>
- <input type="hidden" name="tracking">
- <!-- need to grab the tracking info if it doesn't exist in the env-param -->
- <xsl:choose>
- <xsl:when test="key('env-param', 'tracking')">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'tracking')"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="markup-track">
- <xsl:apply-templates select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Header']/*[local-name() = 'biBusHeader']/*[local-name() = 'tracking']/*[local-name() = 'conversationContext']" mode="markup"/>
- </xsl:variable>
- <xsl:attribute name="value"><xsl:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-track), true()))"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </input>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">ccs_cbdata</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">ccs_invoke</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">clientContext</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">returnEntireResponse</xsl:with-param>
- </xsl:call-template>
- <xsl:if test="key('env-param', 'releaseConversation') = '1'">
- <input type="hidden" name="releaseConversation" value="1"/>
- </xsl:if>
- <xsl:if test="key('env-param', 'newWindow') = '1' or key('env-param', 'newWindow') = 'true'">
- <input type="hidden" name="newWindow" value="1"/>
- </xsl:if>
- <xsl:if test="key('env-param', 'ui.debug') = 'true'">
- <input type="hidden" name="ui.debug" value="true"/>
- </xsl:if>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">routingServerGroup</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">md.callBack</xsl:with-param>
- </xsl:call-template>
- </form>
- </body>
- </html>
- </xsl:template>
- <xsl:template name="addInputField">
- <xsl:param name="paramName" select="''"/>
- <xsl:if test="key('env-param', $paramName)">
- <input type="hidden" name="{$paramName}" value="{key('env-param', $paramName)}"/>
- </xsl:if>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="remove-primary-request-tags" dependency="init" type="exec" mode="interpret" mandatory="false" processor="XSLT" condition=".[starts-with(/root/env/param[@name = 'ui.conversation'], '<bus:primaryRequest')]" nodelist="env">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="xsl xtsext xos cm bus SOAP-ENV xsi xsd xts">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <PRconversation>
- <xsl:value-of select="/root/env/param[@name = 'ui.conversation']" disable-output-escaping="yes"/>
- </PRconversation>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="set-conversation" dependency="remove-primary-request-tags" type="exec" mode="interpret" mandatory="false" processor="XSLT" condition=".[/root/PRconversation]" nodelist="env, PRconversation">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xsl xtsext xos cm bus SOAP-ENV xsi pf xsd xts">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:replace select="/root/env/param[@name='ui.conversation']">
- <param name="ui.conversation">
- <xsl:variable name="markup-conv">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/PRconversation/*[local-name()='primaryRequest']/*"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="string($markup-conv)"/>
- </param>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- render-page-fragment - Main page rendering block. Combines the "content" blocks generated in the blocks above with the report itself which is
- returned in a multi-part message from report server.
- ===============================================================================================
- -->
- <xts:block id="render-page-fragment" dependency="init set-conversation getOutput" type="exec" mode="output" mimeType="text/html" processor="XSLT" condition=".[/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name()='details']/item/*[local-name() = 'status'] = 'prompting']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="rv/logicsheets/rvlogic.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:rvl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/rv/rvlogic/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xhtml="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xos pf mt mf xtsext cf cp bus xts dp SOAP-ENV xhtml rvl">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'report-viewer.xts'"/>
- <pf:variables/>
- <xsl:template match="/root">
- <link rel="stylesheet" type="text/css" href="{$skin_root}/portal/default.css"/>
- <script type="text/javascript" charset="utf-8" src="{$webcontent}/{$app}/js/cookie_jar.js"></script>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/prompting/CDispatcher.js"></script>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/prompting/pds.js"></script>
- <xsl:choose>
- <xsl:when test="/root/*[local-name() = 'response']/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportOutput']">
- <xsl:value-of select="/root/*[local-name() = 'response']/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportOutput']/*[local-name()='outputPages']/item" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name() = 'response']/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*/*[local-name() = 'item']" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- <script type="text/javascript">
- <xsl:choose>
- <xsl:when test="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*[local-name() = 'primaryRequest']">
- <xsl:variable name="markup-conv">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*[local-name() = 'primaryRequest']/*"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text/>F_pdsSetFormValue( 'ui.conversation', "<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-conv), true()))))"/>" );<xsl:text/>
- </xsl:when>
- <xsl:when test="string(key('env-param', 'isEncoded')) = '1'">
- <xsl:text/>F_pdsSetFormValue( 'ui.conversation', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ui.conversation')))"/>" );<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/>F_pdsSetFormValue( 'ui.conversation', "<xsl:value-of select="xtsext:javascriptencode(string(xtsext:web64encode(string(key('env-param', 'ui.conversation')), true())))"/>" );<xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- if (document.formWarpRequest["m"]) {
- document.formWarpRequest.m.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm')))"/>";
- }
- <xsl:choose>
- <xsl:when test="key('env-param', 'tracking') != ''">
- <!-- we'll take any tracking information that is being round tripped -->
- <xsl:choose>
- <xsl:when test="string(key('env-param', 'isEncoded')) = '1'">
- var tracking = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'tracking')))"/>";
- </xsl:when>
- <xsl:otherwise>
- var tracking = "<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(key('env-param', 'tracking')), true()))))"/>";
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="passport">
- <xsl:choose>
- <!-- pull the passport out of the bus header -->
- <xsl:when test="/root/credential/param[@name='CAM']/*[local-name() = 'CAM']/*[local-name = 'CAMPassport']/*[local-name() = 'id']">
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() = 'CAM']/*[local-name = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:when>
- <!-- if it's not there, see if it is still in the cookie -->
- <xsl:otherwise>
- <xsl:value-of select="xtsext:camcookie_action('getPassportID', $CAMPassportCookie)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="markup-track"><xsl:apply-templates select="/root/response/*[local-name()='Envelope']/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']/*[local-name() = 'conversationContext']" mode="markup"/></xsl:variable>
- var tracking = "<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-track), true()))))"/>";
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text/>F_pdsSetFormValue( 'tracking', tracking );<xsl:text/>
- <xsl:if test="key('env-param', 'ccs_cbdata')">
- <xsl:text/>F_pdsSetFormValue( 'ccs_cbdata', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_cbdata')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'ccs_invoke')">
- <xsl:text/>F_pdsSetFormValue( 'ccs_invoke', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_invoke')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'routingServerGroup')">
- <xsl:text/>F_pdsSetFormValue( 'routingServerGroup', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'routingServerGroup')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'isEncoded')">
- <xsl:text/>F_pdsSetFormValue( 'isEncoded', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'isEncoded')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'clientContext')">
- <xsl:text/>F_pdsSetFormValue( 'clientContext', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'clientContext')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'returnEntireResponse')">
- <xsl:text/>F_pdsSetFormValue( 'returnEntireResponse', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'returnEntireResponse')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'newWindow') = '1' or key('env-param', 'newWindow') = 'true'">
- <xsl:text/>F_pdsSetFormValue( 'newWindow', 1 );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'ui.cafcontextid')">
- <xsl:text/>F_pdsSetFormValue( 'ui.cafcontextid', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ui.cafcontextid')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'run.xslURL')">
- <xsl:text/>F_pdsSetFormValue( 'run.xslURL', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'run.xslURL')))"/>" );<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'md.callBack')">
- <xsl:text/>F_pdsSetFormValue( 'md.callBack', "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'md.callBack')))"/>" );<xsl:text/>
- </xsl:if>
- function promptButtonCancel()
- {
- F_pdsCallback(
- {"state":"Cancel"<xsl:text/>
- <xsl:if test="key('env-param', 'clientContext')">
- <xsl:text/>,"clientContext":"<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'clientContext')))"/>"<xsl:text/>
- </xsl:if>
- <xsl:if test="key('env-param', 'ccs_cbdata')">
- <xsl:text/>,"ccs_cbdata":"<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_cbdata')))"/>"<xsl:text/>
- </xsl:if>
- },
- "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_invoke')))"/>"
- );
- <xsl:if test="key('env-param', 'newWindow') = '1' or key('env-param', 'newWindow') = 'true'">
- window.close();
- </xsl:if>
- }
- </script>
- </xsl:template>
- <xsl:template name="convertBackJSEncoding">
- <xsl:param name="str"/>
- <xsl:choose>
- <xsl:when test="contains($str, '\n')">
- <xsl:call-template name="convertBackJSEncoding">
- <xsl:with-param name="str" select="substring-before($str, '\n')"/>
- </xsl:call-template><xsl:text>
- </xsl:text>
- <xsl:call-template name="convertBackJSEncoding">
- <xsl:with-param name="str" select="substring-after($str, '\n')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($str, '\t')">
- <xsl:call-template name="convertBackJSEncoding">
- <xsl:with-param name="str" select="substring-before($str, '\t')"/>
- </xsl:call-template><xsl:text> </xsl:text><xsl:call-template name="convertBackJSEncoding">
- <xsl:with-param name="str" select="substring-after($str, '\t')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($str, '\\')">
- <xsl:call-template name="convertBackJSEncoding">
- <xsl:with-param name="str" select="substring-before($str, '\\')"/>
- </xsl:call-template>\<xsl:call-template name="convertBackJSEncoding">
- <xsl:with-param name="str" select="substring-after($str, '\\')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$str" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="render-page-finished" type="exec" mode="output" mimeType="text/html" processor="XSLT" dependency="execute wait"
- condition=".[(/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name() = 'status'] = 'complete' or
- /root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name() = 'status'] = 'conversationComplete') and
- not(/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*/*[local-name()='result']/*[local-name()='details']/item/*[local-name() = 'status'] = 'prompting')]"
- mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="rv/logicsheets/rvlogic.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.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:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:rvl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/rv/rvlogic/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="xos pf mt mf xtsext cf cp bus xts dp SOAP-ENV xhtml">
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <pf:variables/>
- <pf:serialize-xml/>
- <xsl:template match="/root">
- <xsl:variable name="markup-track">
- <xsl:apply-templates select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Header']/*[local-name() = 'biBusHeader']/*[local-name() = 'tracking']/*[local-name() = 'conversationContext']" mode="markup"/>
- </xsl:variable>
- <html>
- <head>
- <META http-equiv="Content-Script-Type" content="text/javascript"/>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/prompting/CDispatcher.js"></script>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/prompting/pds.js"></script>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/common/framework/util/requestManager.js"></script>
- <script type="text/javascript">
- function complete()
- {
- var conversation = null;
- var paramValues = new Array();
- <!-- calling it RPFpassport to avoid variable name collision: R(ender) P(age) F(inished) -->
- <xsl:variable name="RPFpassport">
- <xsl:choose>
- <!-- pull the passport out of the bus header -->
- <xsl:when test="/root/credential/param[@name='CAM']/*[local-name() = 'CAM']/*[local-name = 'CAMPassport']/*[local-name() = 'id']">
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() = 'CAM']/*[local-name = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:when>
- <!-- if it's not there, see if it is still in the cookie -->
- <xsl:otherwise>
- <xsl:value-of select="xtsext:camcookie_action('getPassportID', $CAMPassportCookie)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="key('env-param', 'returnEntireResponse') = '1' or key('env-param', 'returnEntireResponse') = 'true'">
- <xsl:variable name="response-markup-params">
- <xsl:apply-templates select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*" mode="markup"/>
- </xsl:variable>
- var response = "<xsl:value-of select="xtsext:javascriptencode(string($response-markup-params))"/>";
- </xsl:when>
- <xsl:otherwise>
- var response = "<xsl:value-of select="xtsext:javascriptencode(string(/root/*[local-name() = 'response']/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*/*[local-name() = 'item']))"/>";
- </xsl:otherwise>
- </xsl:choose>
- <xsl:for-each select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*/item[@xsi:type='bus:asynchDetailParameterValues']/*/*">
- <xsl:variable name="markup-params">
- <xsl:apply-templates select="." mode="markup"/>
- </xsl:variable>
- paramValues.push("<xsl:value-of select="xtsext:javascriptencode(string($markup-params))"/>");
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="key('env-param', 'releaseConversation') = '1'">
- dispatchObjectModelRequest("release");
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="markup-conv">
- <xsl:apply-templates select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*[local-name() = 'primaryRequest']/*" mode="markup"/>
- </xsl:variable>
- <xsl:variable name="passport">
- <xsl:choose>
- <!-- pull the passport out of the bus header -->
- <xsl:when test="/root/credential/param[@name='CAM']/*[local-name() = 'CAM']/*[local-name = 'CAMPassport']/*[local-name() = 'id']">
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() = 'CAM']/*[local-name = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:when>
- <!-- if it's not there, see if it is still in the cookie -->
- <xsl:otherwise>
- <xsl:value-of select="xtsext:camcookie_action('getPassportID', $CAMPassportCookie)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- conversation = "<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-conv), true()))))"/>";
- </xsl:otherwise>
- </xsl:choose>
- F_pdsCallback(
- {
- "parameters": paramValues,
- "state": response,
- "conversation": conversation,
- "clientContext": "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'clientContext')))"/>",
- "tracking": "<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $RPFpassport), xtsext:web64encode(string($markup-track), true()))))"/>"
- <xsl:if test="key('env-param', 'ccs_cbdata')">
- <xsl:text/>,"ccs_cbdata":"<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_cbdata')))"/>"<xsl:text/>
- </xsl:if>
- },
- "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_invoke')))"/>"
- );
- <xsl:if test="key('env-param', 'newWindow') = '1' or key('env-param', 'newWindow') = 'true'">
- window.close();
- </xsl:if>
- }
- </script>
- </head>
- <body onload="complete();">
- <form name="formWarpRequest" id="formWarpRequest" method="post" style="height:100%;margin:0px">
- <xsl:attribute name="onsubmit">if((typeof promptButtonOK).match(/^function$/i)){promptButtonOK();return false;} else if((typeof execute).match(/^function$/i)){execute();return false;}</xsl:attribute>
- <input type="hidden" name="m" value="{key('env-param', 'm')}"/>
- <input type="hidden" name="b_action" value="xts.run"/>
- <input type="hidden" name="run.xslURL" value="sa.xsl"/>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">lang</xsl:with-param>
- </xsl:call-template>
- <input type="hidden" name="ui.object">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'ui.object')"/></xsl:attribute>
- </input>
- <input type="hidden" name="ui.backURL">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'ui.backURL')"/></xsl:attribute>
- </input>
- <input type="hidden" name="ui.action">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'ui.action')"/></xsl:attribute>
- </input>
- <input type="hidden" name="ui.errURL">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'ui.errURL')"/></xsl:attribute>
- </input>
- <input type="hidden" name="tracking">
- <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'tracking')"/></xsl:attribute>
- </input>
- <input type="hidden" name="ui.conversation">
- <xsl:variable name="markup-conv">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*/*[local-name() = 'primaryRequest']/*"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:attribute name="value"><xsl:value-of select="xtsext:web64encode(string($markup-conv), true())"/></xsl:attribute>
- </input>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">ccs_invoke</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">ccs_cbdata</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">clientContext</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">clientContext</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">returnEntireResponse</xsl:with-param>
- </xsl:call-template>
- <xsl:if test="key('env-param', 'releaseConversation') = '1'">
- <input type="hidden" name="releaseConversation" value="1"/>
- </xsl:if>
- <xsl:if test="key('env-param', 'newWindow') = '1' or key('env-param', 'newWindow') = 'true'">
- <input type="hidden" name="newWindow" value="1"/>
- </xsl:if>
- <xsl:if test="key('env-param', 'ui.debug') = 'true'">
- <input type="hidden" name="ui.debug" value="true"/>
- </xsl:if>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">routingServerGroup</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">ui.cafcontextid</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">run.xslURL</xsl:with-param>
- </xsl:call-template>
- <xsl:call-template name="addInputField">
- <xsl:with-param name="paramName">md.callBack</xsl:with-param>
- </xsl:call-template>
- </form>
- </body>
- </html>
- </xsl:template>
- <xsl:template name="addInputField">
- <xsl:param name="paramName" select="''"/>
- <xsl:if test="key('env-param', $paramName)">
- <input type="hidden" name="{$paramName}" value="{key('env-param', $paramName)}"/>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|