123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538 |
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" requiredCapability="canUseQueryStudio">
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2019
- 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:block id="queryCM" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='xxRetrievePrompt']='true']" mandatory="false" nodelist="header, env, http, cookies, bus:biBusHeader">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" responseEnvelope="false" soapAction="http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201404/">
- <SOAP-ENV:Envelope xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <!--<bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='ui.routingServerGroup']!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="/root/env/param[@name='ui.routingServerGroup']"/>
- </routingServerGroup>
- </bus:routing>
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='routing']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*"/>
- </xsl:otherwise>
- </xsl:choose>
- </bus:biBusHeader>-->
- <xsl:if test="/root/env/param[@name='markup_track']!=''">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','markup_track'))), true())" disable-output-escaping="yes"/>
- </xsl:if>
- <xsl:apply-templates select="/root/header/*[local-name() = 'biBusHeader']/*[local-name() != 'tracking' and local-name() != 'dispatcherTransportVars']"/>
- <xsl:if test="string(/root/env/param[@name='ui.routingServerGroup'])!=''">
- <bus:routing xsi:type="bus:routingInfo">
- <routingServerGroup>
- <xsl:value-of select="/root/env/param[@name='ui.routingServerGroup']"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
- <search>
- <xsl:value-of select="xtsext:urldecode(string(/root/env/param[@name='xxSearchPath']))"/>
- </search>
- <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[1]">
- <item xsi:type="">parameters</item>
- </properties>
- </cm:query>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="convertParameters" condition=".[/root/env/param[@name='xxExecutionParameters']!='']" mode="interpret" processor="XSLT" type="exec" mandatory="false" nodelist="env">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <executionParameters>
- <xsl:choose>
- <xsl:when test="starts-with(/root/env/param[@name='xxExecutionParameters'], 'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap_settemplatename_filterpicklist_settemplateid_01', string(/root/env/param[@name='xxExecutionParameters'])), true())" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(string(/root/env/param[@name='xxExecutionParameters']), true())" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </executionParameters>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getContent" mode="interpret" processor="XSLT" type="exec" dependency="queryCM convertParameters" nodelist="env, header, command, system, session, user, actions, tabs, http, configProps, credential, cookies, setCookies, accountOptions, newSession, gatewayURI, bus:biBusHeader, executionParameters, output, SOAP-ENV:Envelope">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <pf:variables/>
- <xsl:variable name="colId">
- <xsl:text/>
- <xsl:value-of select="/root/env/param[@name='xxColid']"/>
- <xsl:text/>
- </xsl:variable>
- <xsl:variable name="useItemRef">
- <xsl:text/>
- <xsl:value-of select="/root/env/param[@name='xxUseItemRef']"/>
- <xsl:text/>
- </xsl:variable>
- <xsl:variable name="displayItemRef">
- <xsl:text/>
- <xsl:value-of select="/root/env/param[@name='xxDisplayItemRef']"/>
- <xsl:text/>
- </xsl:variable>
- <xsl:variable name="displayItemRefExp">
- <xsl:text/>
- <xsl:value-of select="/root/env/param[@name='xxDisplayItemRefExp']"/>
- <xsl:text/>
- </xsl:variable>
- <xsl:variable name="fullColExpression">
- <xsl:text/>
- <xsl:value-of select="/root/env/param[@name='xxFullColExpression']"/>
- <xsl:text/>
- </xsl:variable>
- <!-- The display item ref is the displayItemRef if defined and if not it is the colID-->
- <xsl:variable name="displayItemRefColumn">
- <xsl:choose>
- <xsl:when test="$displayItemRef != ''">
- <xsl:value-of select="$displayItemRef" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$colId" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="displayItemRefColumnExpr">
- <xsl:choose>
- <xsl:when test="$displayItemRefExp != ''">
- <xsl:value-of select="$displayItemRefExp" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$fullColExpression" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="useItemRefColumn">
- <!-- set the dataItemRef to request. This is useItemRef or colId. -->
- <xsl:choose>
- <xsl:when test="$useItemRef != ''">
- <xsl:value-of select="$useItemRef" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$colId" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="sortItemRefColumn">
- <!-- set the dataItemRef to request. This is displayItemRef, useItemRef or colId. -->
- <xsl:choose>
- <xsl:when test="$displayItemRef != ''">
- <xsl:value-of select="$displayItemRef" />
- </xsl:when>
- <xsl:when test="$useItemRef != ''">
- <xsl:value-of select="$useItemRef" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$colId" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="QSRunSpecification">
- <report expressionLocale="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxExprLocale']))"/>" xmlns="http://developer.cognos.com/schemas/report/5.0/">
- <layouts>
- <layout>
- <reportPages>
- <page name="PromptPage">
- <pageBody>
- <contents>
- <selectWithSearch name="pSearch" parameter="searchEngine" refQuery="Query1">
-
- <useItem refDataItem="<xsl:value-of select="xtsext:xmlencode(string($useItemRefColumn))"/>"><xsl:text/>
- <displayItem refDataItem="<xsl:value-of select="xtsext:xmlencode(string($displayItemRefColumn))"/>"/><xsl:text/>
- </useItem>
- <sortList>
- <sortItem refDataItem="<xsl:value-of select="xtsext:xmlencode(string($sortItemRefColumn))"/>" sortOrder="ascending"/>
- </sortList>
-
- </selectWithSearch>
- </contents>
- </pageBody>
- </page>
- </reportPages>
- </layout>
- </layouts>
- <modelPath><xsl:value-of select="xtsext:xmlencode(xtsext:urldecode(string(/root/env/param[@name='xxModelName'])))"/></modelPath>
- <queries>
- <query name="Query1">
- <source>
- <model/>
- </source>
- <selection>
- <xsl:if test="$useItemRef != '' and $useItemRef != $displayItemRefColumn">
- <dataItem name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxUseItemRef']))"/>" aggregate="none">
- <expression><xsl:text/>
- <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxUseItemRefExp']))"/>
- <xsl:text/></expression>
- </dataItem>
- </xsl:if>
- <xsl:if test="$colId != '' and $colId != $useItemRef and $colId != $displayItemRefColumn">
- <dataItem name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxColid']))"/>" aggregate="none">
- <expression><xsl:text/>
- <xsl:value-of select="xtsext:xmlencode(string($fullColExpression))"/>
- <xsl:text/></expression>
- </dataItem>
- </xsl:if>
- <xsl:if test="$displayItemRefColumn != ''">
- <dataItem name="<xsl:value-of select="xtsext:xmlencode(string($displayItemRefColumn))"/>" aggregate="none">
- <expression><xsl:text/>
- <xsl:value-of select="xtsext:xmlencode(string($displayItemRefColumnExpr))"/>
- <xsl:text/></expression>
- </dataItem>
- </xsl:if>
-
- <xsl:for-each select="/root/env/param[@name='xxOtherCols']">
- <xsl:variable name="var"><xsl:value-of select="."/></xsl:variable>
- <xsl:variable name="colLabel"><xsl:value-of select="substring-before($var,',')"/></xsl:variable>
- <xsl:variable name="colExpr"><xsl:value-of select="substring-after($var,',')"/></xsl:variable>
- <dataItem name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name=$colLabel]))"/>" aggregate="none">
- <expression><xsl:text/>
- <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name=$colExpr]))"/>
- <xsl:text/></expression>
- </dataItem>
- </xsl:for-each>
- <!-- I don't know how this should work for prompt cascades yet
- <xsl:for-each select="/root/env/param[@name='xxPromptCascade']">
- <detailFilter>
- <filter use="optional">
- <filterExpression><xsl:value-of select="."/></filterExpression>
- </filter>
- </detailFilter>
- </xsl:for-each>
- -->
- </selection>
- <xsl:if test="
- (/root/env/param[@name='xxIsAttribute'] = 'true' and not(/root/env/param[@name='xxFilterItemRefExp']))
- or
- (/root/env/param[@name='xxOtherCols'] and (/root/env/param[@name='xxCalcOp'] = 'rangeNumber' or /root/env/param[@name='xxIsCondStyle'] = 'true'))">
- <dimensionInfo>
- <dimensions>
- <xsl:if test="(/root/env/param[@name='xxFilterItemRef']!='') or (/root/env/param[@name='xxColid'])">
- <dimension name="dimFilterItemRef">
- <levels>
- <xsl:if test="/root/env/param[@name='xxFilterItemRef']!=''">
- <level name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxFilterItemRef']))"/>">
- <keys>
- <key name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxFilterItemRef']))"/>" refDataItem="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxFilterItemRef']))"/>"/>
- </keys>
- </level>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='xxColid']">
- <level name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxColid']))"/>">
- <keys>
- <key name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxColid']))"/>" refDataItem="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxColid']))"/>"/>
- </keys>
- </level>
- </xsl:if>
- </levels>
- </dimension>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='xxOtherCols'] and (/root/env/param[@name='xxCalcOp'] = 'rangeNumber' or /root/env/param[@name='xxIsCondStyle'] = 'true')">
- <xsl:for-each select="/root/env/param[@name='xxOtherCols']">
- <xsl:variable name="var"><xsl:value-of select="."/></xsl:variable>
- <xsl:variable name="colLabel"><xsl:value-of select="substring-before($var,',')"/></xsl:variable>
- <xsl:variable name="colExpr"><xsl:value-of select="substring-after($var,',')"/></xsl:variable>
- <dimension name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name=$colLabel]))"/>">
- <levels>
- <level name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name=$colLabel]))"/>">
- <keys>
- <key name="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name=$colLabel]))"/>" refDataItem="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name=$colLabel]))"/>"/>
- </keys>
- </level>
- </levels>
- </dimension>
- </xsl:for-each>
- </xsl:if>
- </dimensions>
- </dimensionInfo>
- </xsl:if>
- </query>
- </queries>
- </report>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <param name="QSRunSpecification"><xsl:value-of select="$QSRunSpecification"/></param>
- </xts:append>
- <xts:append>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/" faultBlock="faultHandler" responseEnvelope="true" outputHeader="true">
- <SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:if test="/root/env/param[@name='searchTracking']!='' or /root/header/bus:biBusHeader/*[local-name()='tracking']">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='searchTracking']!=''">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='searchTracking'])), true())" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:if test="/root/env/param[@name='markup_track']!=''">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','markup_track'))), true())" disable-output-escaping="yes"/>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='ui.routingServerGroup']!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="/root/env/param[@name='ui.routingServerGroup']"/>
- </routingServerGroup>
- </bus:routing>
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='routing' and local-name()!='tracking' and local-name() != 'dispatcherTransportVars']"/>
- </xsl:when>
- <xsl:otherwise>
- <!--For bug 611371. Don't copy the dispatcherTransportVars since these are copied directly from
- the browser. This can cause permission problems due to a 'front' = 'true' variable signifying
- this as an external request, even though it's internal.-->
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name() != 'tracking' and local-name() != 'dispatcherTransportVars']"/>
- </xsl:otherwise>
- </xsl:choose>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='searchConversation']!=''">
- <forward xmlns="http://developer.cognos.com/schemas/reportService/1">
- <bus:conversation xsi:type="bus:asynchRequest">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='searchConversation'])), true())" disable-output-escaping="yes"/>
- </bus:conversation>
- <xsl:call-template name="setParameterValues"/>
- <xsl:call-template name="setOptions"/>
- </forward>
- </xsl:when>
- <xsl:otherwise>
- <runSpecification xmlns="http://developer.cognos.com/schemas/reportService/1">
- <specification xsi:type="bus:reportServiceReportSpecification">
- <bus:value xsi:type="bus:specification">
- <xsl:value-of select="$QSRunSpecification"/>
- </bus:value>
- </specification>
- <xsl:call-template name="setParameterValues"/>
- <xsl:call-template name="setOptions"/>
- </runSpecification>
- </xsl:otherwise>
- </xsl:choose>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="setParameterValues" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
- <parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]">
- <xsl:for-each select="/root/env/param[@name='xxCreds']">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:for-each>
- <xsl:for-each select="/root/env/param[@name='xxPromptValues']">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:for-each>
- <xsl:if test="/root/executionParameters">
- <xsl:copy-of select="/root/executionParameters/*[local-name()='parameters']/*"/>
- </xsl:if>
- </parameterValues>
- </xsl:template>
- <xsl:template name="setOptions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
- <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" >
- <item xsi:type="bus:runOptionStringArray">
- <bus:name xsi:type="bus:runOptionEnum">outputFormat</bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
- <item>XHTML</item>
- </bus:value>
- </item>
- <item xsi:type="bus:runOptionAnyURI">
- <bus:name xsi:type="bus:runOptionEnum">xslURL</bus:name>
- <bus:value xsi:type="xsd:string">null.xsl</bus:value>
- </item>
- <item xsi:type="bus:asynchOptionInt">
- <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
- <bus:value xsi:type="xsd:int">0</bus:value>
- </item>
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
- <bus:value xsi:type="xsd:boolean">false</bus:value>
- </item>
- <xsl:if test="/root/env/param[@name='xxDesignMode'] = 'true'">
- <item xsi:type="bus:runOptionData">
- <bus:name xsi:type="bus:runOptionEnum">data</bus:name>
- <bus:value xsi:type="bus:dataEnum">previewWithLimitedData</bus:value>
- </item>
- </xsl:if>
- </options>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="appendDocument" mode="interpret" processor="XSLT" type="exec" dependency="getContent" mandatory="false" nodelist="env, output, SOAP-ENV:Envelope, cm:queryResponse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts cm bus xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <xsl:value-of select=".//*[local-name()='runSpecificationResponse' or local-name()='forwardResponse']/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='outputPages']/*[local-name()='item']" disable-output-escaping="yes"/>
- </xts:append>
- <xts:append select="/root/env">
- <param name="promptSelections"><selectChoices><xsl:for-each select="/root/*[local-name() = 'queryResponse']/queryResult/item/parameters/value/item"><xsl:if test="/root/env/param[@name='xxPromptParam']=./name"><xsl:for-each select="./value/item"><selectOption><xsl:attribute name="displayValue"><xsl:value-of select="./display" disable-output-escaping="yes"/></xsl:attribute><xsl:attribute name="useValue"><xsl:value-of select="./use" disable-output-escaping="yes"/></xsl:attribute></selectOption></xsl:for-each></xsl:if></xsl:for-each></selectChoices></param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- A block to handle a prompt response. This usually doesn't happen because all our prompts are already defined via xxPromptParams
- or in executionParameters. However, in the case of prompt macros, they may not be defined when in nodata mode. (See bug 613217).
- Simply creates javascript that contains the report spec we're going to round-trip to promptDataSource.xts.
- -->
- <xts:block id="handlePrompt" mode="output" processor="XSLT" type="exec" mimeType="application/x-javascript" dependency="appendDocument" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" condition=".[/root/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*/*[local-name() = 'result']/*[local-name() = 'details']/item/*[local-name() = 'status'] = 'prompting']" mandatory="false">
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" version="1.0">
- <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
-
- <!-- Set the run Specification we've already created. This will be passed along to promptDataSource.xts -->
- <xsl:variable name="runSpecification">
- <xsl:value-of select="/root/env/param[@name='QSRunSpecification']"/>
- </xsl:variable>
- <xsl:template match="/root">
- var bPrompting = true;
- var sReportSpecification = "<xsl:text/><xsl:value-of select="xtsext:javascriptencode($runSpecification)"/><xsl:text/>";
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="parseContent" mode="output" processor="XSLT" type="exec" mimeType="application/x-javascript" dependency="appendDocument" mandatory="false" nodelist="env, header, command, system, session, user, actions, tabs, http, configProps, credential, cookies, setCookies, accountOptions, newSession, gatewayURI, executionParameters, logonFault, Document, output, SOAP-ENV:Envelope">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" version="1.0">
- <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <pf:serialize-xml/>
- <xsl:template match="/root">
- <xsl:choose>
- <xsl:when test="/root/logonFault">
- <xsl:text/>FAULT;timeout<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="textBoxControlLocal">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='textBoxControl']='checkBoxListpList'">checkBoxListpList</xsl:when>
- <xsl:when test="/root/env/param[@name='textBoxControl']='treepList'">treepList</xsl:when>
- <xsl:otherwise>searchpSearch</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:for-each select="/root/Document/DATA/PAGE/OTR/OTD/selectWithSearch/selectOptions/selectOption">
- <xsl:text/>
- <xsl:value-of select="$textBoxControlLocal"/>.addNoUpdate(<xsl:text/>
- <xsl:text/>'<xsl:value-of select="xtsext:javascriptencode(./@displayValue)"/>','<xsl:value-of select="xtsext:javascriptencode(./@useValue)"/>','result',false<xsl:text/>
- <xsl:text/>);<xsl:text/>
- </xsl:for-each>
- <xsl:for-each select="/root/env/param[@name='promptSelections']/selectChoices/selectOption">
- <xsl:text/>
- <xsl:value-of select="$textBoxControlLocal"/>.addNoUpdate(<xsl:text/>
- <xsl:text/>'<xsl:value-of select="xtsext:javascriptencode(./@displayValue)"/>','<xsl:value-of select="xtsext:javascriptencode(./@useValue)"/>','list',false<xsl:text/>
- <xsl:text/>);<xsl:text/>
- </xsl:for-each>
- <xsl:text/><xsl:value-of select="$textBoxControlLocal"/>.update();<xsl:text/>
- <xsl:if test="/root//*[local-name()='runSpecificationResponse']/*[local-name()='result']/*[local-name()='primaryRequest']">
- <xsl:variable name="conversation">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root//*[local-name()='runSpecificationResponse']/*[local-name()='result']/*[local-name()='primaryRequest']/*"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text/>getConfigFrame().dlgGlobalSetParm("searchConversation", "<xsl:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($conversation), true()))" disable-output-escaping="yes"/>");<xsl:text/>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="/root/*[local-name()='Envelope']/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']">
- <xsl:variable name="tracking">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/*[local-name()='Envelope']/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text/>getConfigFrame().dlgGlobalSetParm("searchTracking", "<xsl:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($tracking), true()))" disable-output-escaping="yes"/>");<xsl:text/>
- </xsl:when>
- <xsl:when test="/root/header/*[local-name()='biBusHeader']/*[local-name()='tracking']">
- <xsl:variable name="tracking">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/header/*[local-name()='biBusHeader']/*[local-name()='tracking']"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:text/>getConfigFrame().dlgGlobalSetParm("searchTracking", "<xsl:value-of select="xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($tracking), true()))" disable-output-escaping="yes"/>");<xsl:text/>
- </xsl:when>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" path="qs/logicsheets/faultHandler.xsl" type="fault" processor="XSLT" nodelist="fault"/>
- </xts:morphlet>
|