123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
- <xts:block id="wait" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='m_tracking'] and /root/env/param[@name='doWait']='1']" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <response>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.absolute" faultBlock="faultHandler" responseEnvelope="true" outputHeader="true">
- <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader">
- <bus:tracking>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','m_tracking'))), true())" disable-output-escaping="yes"/>
- </bus:tracking>
-
- <!-- 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/*[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>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <xsl:element name="wait" namespace="http://developer.cognos.com/schemas/reportService/1">
- <bus:conversation xsi:type="bus:asynchRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:nil="true"/>
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
- <bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
- </xsl:element>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- don't include superfluous fields in Envelope -->
- <xsl:template match="*[local-name()='formFieldVars']/item[name='inlineSpec' or name='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>
- <xts:block id="prependDocument" mode="interpret" processor="XSLT" type="exec" condition=".[not(/root/env/param[@name = 'functionList']) and not(/root/env/param[@name = 'doWait'])]" mandatory="false">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl 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="/root">
- <xts:sequence>
- <xts:append select="/root">
- <trackingInfo>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','m_tracking'))), true())" disable-output-escaping="yes"/>
- </trackingInfo>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="appendExecutionParameters" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='executionParameters']!='']" mandatory="false">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts cm xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <executionParameters xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:xs="http://www.w3.org/2001/XMLSchema">
- <xsl:choose>
- <xsl:when test="starts-with(/root/env/param[@name='executionParameters'], 'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='executionParameters'])), true())" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(string(/root/env/param[@name='executionParameters']), true())" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </executionParameters>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getContent" type="exec" mode="interpret" processor="XSLT" dependency="prependDocument appendExecutionParameters" condition=".[not(/root/env/param[@name = 'functionList']) and
- (/root/response/*/*/*/*/*[local-name() = 'status'] != 'working' or
- /root/response/*/*/*/*/*[local-name() = 'status'] != 'stillWorking' or
- /root/response/*/*/*/*/*[local-name() = 'status'] != 'complete' or
- not(/root/env/param[@name = 'doWait']))]" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xsi xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name" />
- <xsl:variable name="authoringLocale">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='el']!=''">
- <xsl:value-of select="/root/env/param[@name='el']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='cl']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.session" faultBlock="faultHandler" responseEnvelope="false" outputHeader="true">
- <SOAP-ENV:Envelope 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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="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>
- </bus:biBusHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <runSpecification xmlns="http://developer.cognos.com/schemas/reportService/1">
- <bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <bus:value xsi:type="bus:specification"><metadataRequest connection="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='model']))"/>">
- <Functions authoringLocale="<xsl:value-of select="$authoringLocale"/>">
- <Properties>
- <Property name="./group"/>
- <Property name="group/@id"/>
- <Property name="group/@qosLevel"/>
- <Property name="./function"/>
- <Property name="function/@id"/>
- <Property name="function/@type"/>
- <Property name="function/@qosLevel"/>
- </Properties>
- <Constraints>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='fetch']='onlyOperation'">
- <Constraint Condition="FDS[@type='operation']"/>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='fetch']='all'">
- <Constraint Condition="FDS[@type='operation']"/>
- <Constraint Condition="FDS[@type='function']"/>
- <Constraint Condition="FDS[@type='operator']"/>
- <Constraint Condition="FDS[@type='literal']"/>
- <Constraint Condition="FDS[@type='summary']"/>
- </xsl:when>
- <xsl:otherwise>
- <Constraint Condition="FDS[@type='function']"/>
- <Constraint Condition="FDS[@type='operator']"/>
- <Constraint Condition="FDS[@type='literal']"/>
- <Constraint Condition="FDS[@type='summary']"/>
- </xsl:otherwise>
- </xsl:choose>
- </Constraints>
- </Functions>
- </metadataRequest></bus:value>
- </bus:specification>
- <xsl:choose>
- <xsl:when test="key('env-param', 'metadataParameters') != ''">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:if test="string(/root/env/param[@name='metadataParameters'])!= 'null'">
- <xsl:value-of select="/root/env/param[@name='metadataParameters']" disable-output-escaping="yes"/>
- </xsl:if>
- <xsl:if test="/root/executionParameters != ''">
- <xsl:for-each select="/root/executionParameters/bus:parameters/*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- </xsl:if>
- </bus:parameterValues>
- </xsl:when>
- <xsl:when test="/root/executionParameters != ''">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:for-each select="/root/executionParameters/bus:parameters/*">
- <xsl:copy-of select="."/>
- </xsl:for-each>
- </bus:parameterValues>
- </xsl:when>
- <xsl:when test="key('env-param', 'parameterValues') != '' and contains(key('env-param', 'parameterValues'), 'item')">
- <xsl:value-of select="string(key('env-param', 'parameterValues'))" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'promptValues') != ''">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:for-each select="/root/env/param[@name='promptValues']">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:for-each>
- </bus:parameterValues>
- </xsl:when>
- <xsl:otherwise>
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
- </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>
- <item xsi:type="bus:runOptionBoolean">
- <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
- <bus:value xsi:type="xsd:boolean">false</bus:value>
- </item>
- </bus:options>
- </runSpecification>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- 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="wait getContent prependDocument" 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"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- exclude-result-prefixes="xsl xts xos cm bus SOAP-ENV xsi send">
- <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>
- <send:request provider="warp" responseEnvelope="true" option="xml-multipart" affinity=".absolute">
- <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>
- </send: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>
- <xts:block id="appendDocument" mode="interpret" processor="XSLT" type="exec" dependency="getContent wait prependDocument getOutput" mandatory="false">
- <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: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:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="key('env-param','functionList')">
- <xts:append select="/root">
- <functionList>
- <xsl:value-of select="substring-after(string(key('env-param','functionList')), '?>')" disable-output-escaping="yes"/>
- </functionList>
- </xts:append>
- </xsl:when>
- <xsl:when test="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status = 'prompting'">
- <xts:append select="/root/env">
- <param name="htmlFragment">
- <xsl:value-of select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
- </param>
- <param name="m_tracking">
- <xsl:for-each select="/root/output/*/*/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']/*">
- <xsl:variable name="markup-track">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="string($markup-track)"/>
- </xsl:for-each>
- </param>
- </xts:append>
- </xsl:when>
- <xsl:when test="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status = 'prompting'">
- <xts:replace select="/root/env/param[@name='htmlFragment' or @name='m_tracking']">
- <param name="htmlFragment">
- <xsl:value-of select="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
- </param>
- <param name="m_tracking">
- <xsl:for-each select="/root/output/*/*/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']/*">
- <xsl:variable name="markup-track">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="string($markup-track)"/>
- </xsl:for-each>
- </param>
- </xts:replace>
- </xsl:when>
- <xsl:otherwise>
- <xts:append select="/root">
- <xsl:choose>
- <xsl:when test="contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:status, 'working') or
- contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:status, 'stillWorking') or
- contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:status, 'stillWorking')">
- <working>
- <xsl:for-each select="/root/output/*/*/*[local-name() = 'Header']/*[local-name() = 'biBusHeader']/*[local-name() = 'tracking']/*">
- <xsl:variable name="markup-track">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="."/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="string($markup-track)"/>
- </xsl:for-each>
- </working>
- </xsl:when>
- <xsl:when test="./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'getOutputResponse']">
- <functionList>
- <xsl:choose>
- <xsl:when test="contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'getOutputResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'getOutputResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'getOutputResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </functionList>
- </xsl:when>
- <xsl:otherwise>
- <functionList>
- <xsl:choose>
- <xsl:when test="contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:when test="contains(./*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:when test="contains(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">
- <xsl:value-of select="substring-after(./response/*[local-name() = 'Envelope']/*[local-name() = 'Body']/*[local-name() = 'waitResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </functionList>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- Process Response
- -->
- <xts:block id="format" mode="output" processor="XSLT" type="exec" mimeType="application/xml" condition="/root/functionList/ResponseRoot or /root/soapFault" dependency="appendDocument" mandatory="false">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- apply the form logic -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- exclude-result-prefixes="xsl xts dbg xtsext bus pf">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xmlResponse>
- <xsl:choose>
- <xsl:when test="./working">
- <xsl:variable name="passport">
- <!-- pull the passport out of the bus header -->
- <xsl:value-of select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
- </xsl:variable>
- <xsl:text/>working;<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='fetch']))"/>;<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(./working), true()))))"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./env/param[@name='htmlFragment']">
- <xsl:variable name="markup-conv">
- <xsl:choose>
- <xsl:when test="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:primaryRequest">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:primaryRequest/*"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="./response/*/*[local-name()='Body']/*/bus:result/bus:primaryRequest/*"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>prompting;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($gateway))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='fetch']))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup-conv), true()))))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(/root/env/param[@name='m_tracking']), true()))))"/>;<xsl:text/>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='htmlFragment']))"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="functionList/ResponseRoot/functionsRoot/group"/>
- <xsl:apply-templates select="./logonFault"/>
- <xsl:apply-templates select="./soapFault"/>
- </xsl:otherwise>
- </xsl:choose>
- </xmlResponse>
- </xsl:template>
- <xsl:template match="/root/functionList/ResponseRoot/functionsRoot/group">
- <xsl:for-each select="./group">
- <xsl:call-template name="recurseFunctionTreeForOKLimited"/>
- </xsl:for-each>
- <xsl:text/>*#*<xsl:text/>
- <xsl:for-each select="./group">
- <xsl:call-template name="recurseFunctionTreeForRestricted"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="/root/logonFault">
- <xsl:text/>FAULT;timeout<xsl:text/>
- <xsl:for-each select="/root/output//bus:biBusHeader/bus:CAM/bus:exception/bus:promptInfo/bus:displayObjects/item[bus:type='hidden']">
- <xsl:text>;</xsl:text>
- <xsl:value-of select="xtsext:javascriptencode(string(bus:name))"/>
- <xsl:text>=</xsl:text>
- <xsl:value-of select="xtsext:javascriptencode(string(bus:value))"/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="recurseFunctionTreeForOKLimited">
- <xsl:for-each select="./group">
- <xsl:call-template name="recurseFunctionTreeForOKLimited"/>
- </xsl:for-each>
- <xsl:for-each select="./function[@qosLevel='OK' or @qosLevel='limited']">
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(@id))"/>;<xsl:text/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="recurseFunctionTreeForRestricted">
- <xsl:for-each select="./group">
- <xsl:call-template name="recurseFunctionTreeForRestricted"/>
- </xsl:for-each>
- <xsl:for-each select="./function[@qosLevel='restricted']">
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string(@id))"/>;<xsl:text/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="/root/soapFault">
- <xsl:text/>FAULT<xsl:text/>
- <xsl:choose>
- <xsl:when test=".//bus:message">
- <xsl:for-each select=".//bus:message">
- <xsl:text/>;<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="./bus:messageString"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="markup">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="."/>
- </xsl:call-template>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- </xsl:variable>
- <xsl:text/>;<xsl:value-of select="$markup"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="commaAndSemicolonEncode">
- <xsl:param name="strVal"/>
- <xsl:choose>
- <xsl:when test="contains($strVal, ',')">
- <xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-before($strVal, ',')"/>
- </xsl:call-template>&comma<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-after($strVal, ',')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="contains($strVal, ';')">
- <xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-before($strVal, ';')"/>
- </xsl:call-template>&semicolon<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal" select="substring-after($strVal, ';')"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:javascriptencode(string($strVal))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" path="qs/logicsheets/faultHandlerMetadata.xsl" type="fault" processor="XSLT"/>
- </xts:morphlet>
|