123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- *****************************************************************
- ** Licensed Materials - Property of IBM
- **
- ** IBM Cognos Products: drill
- **
- ** (C) Copyright IBM Corp. 2001, 2016
- **
- ** 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 resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml,messages/portalRL.xml">
- <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/201610/.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>
- <xsl:apply-templates select="/root/header/*[local-name()='biBusHeader']/*[local-name() != 'tracking']"/>
- </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>
- <!--
- ===============================================================================================
- getOutput - Special case to handle complete.
- With complete, 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" dependency="wait" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name = 'metadataTree']) and (/root/*[local-name()='response']/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']/*/*[local-name()='details']/*[local-name()='item'][@xsi:type='bus:asynchDetailReportStatus']/*[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:append>
- <affinity>absolute</affinity>
- </xts:append>
- </xts:sequence>
- <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/201610/.absolute" faultBlock="faultHandler">
- <SOAP-ENV:Envelope>
- <SOAP-ENV:Header>
- <bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <bus:tracking>
- <xsl:copy-of select="/root/response/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:tracking/*[local-name()='conversationContext']"/>
- </bus:tracking>
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>
- <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param','ui.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" 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:replace>
- </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>
- <xts:block id="appendTracking" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='m_tracking']!='']" 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">
- <tracking xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='m_tracking'])), true())" disable-output-escaping="yes"/>
- </tracking>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="appendRSParam" mode="interpret" processor="XSLT" type="exec" condition=".[/root/env/param[@name='rptSvcParam']!='']" 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">
- <xts:function name="web64decode">
- <xts:param name="source">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='rptSvcParam']))"/>
- </xts:transform>
- </xts:param>
- </xts:function>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getContent" mode="interpret" processor="XSLT" type="exec" condition=".[not(/root/env/param[@name = 'metadataTree']) 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" dependency="appendTracking appendRSParam">
- <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">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <!--
-
- Scope request: Parameter request
- Measure Dimension Y *
- Hierarchical Measure Y *
- Measure Y Y
- Dimension Y *
- Hierarchy Y *
- Level Y *
- Named Set N *
- Query subject Y *
- Query Item Y Y
- Attributes N Y
- Model Calc (fact) N Y
- Model Calc (attributes) N Y
- Model Calc (identifier) N Y
-
- * Valid only if the item can be used as a data item in a query
- -->
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201610/.session" faultBlock="faultHandler" responseEnvelope="false" 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" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <xsl:if test="/root/tracking!=''">
- <!-- use the round-tripped tracking information -->
- <bus:tracking xsi:type="bus:tracking">
- <xsl:copy-of select="/root/tracking/*[local-name()!='conversationContext']"/>
- <bus:conversationContext xsi:type="bus:conversationContext">
- <xsl:copy-of select="/root/tracking/*[local-name()='conversationContext']/*[local-name()!='id']"/>
- <bus:id xsi:type="xs:string"/>
- </bus:conversationContext>
- </bus:tracking>
- </xsl:if>
- <xsl:if test="key('env-param','ui.routingServerGroup')!=''">
- <bus:routing>
- <routingServerGroup>
- <xsl:value-of select="key('env-param','ui.routingServerGroup')"/>
- </routingServerGroup>
- </bus:routing>
- </xsl:if>
- <!-- We don't want to copy the tracking info in this case because we want a separate conversation for the metadata -->
- <xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>
- </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']))"/>">
- <Metadata authoringLocale="<xsl:value-of select="/root/env/param[@name='cl']"/>" xml:lang="<xsl:value-of select="/root/env/param[@name='pl']"/>" <xsl:if test="string(/root/env/param[@name='startAtPath'])!=''">start_at="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='startAtPath']))"/>" </xsl:if>Depth="<xsl:value-of select="/root/env/param[@name='depth']"/>" no_collections="1">
- <!-- <xsl:if test="string(/root/env/param[@name='startAtPath'])='' and string(/root/env/param[@name='selectNode'])!=''"><xsl:text/>
- <Start_at>
- <xsl:call-template name="breakSelection"><xsl:with-param name="selection"><xsl:value-of select="xtsext:substringBeforeLast(string(/root/env/param[@name='selectNode']),'.[')"/></xsl:with-param></xsl:call-template>
- </Start_at><xsl:text/>
- </xsl:if> -->
- <Properties>
- <Property name="*/@name"/>
- <Property name="*/@_path"/>
- <Property name="*/@_ref"/>
- <Property name="*/@isNamespace"/>
- <Property name="*/@screenTip"/>
- <Property name="*/@description"/>
- <Property name="*/@externalOrdinal"/>
- <Property name="./folder"/>
- <Property name="./measureFolder"/>
- <Property name="./querySubject"/>
- <Property name="./queryItem"/>
- <Property name="./queryItemFolder"/>
- <Property name="./filter"/>
- <Property name="./calculation"/>
- <Property name="*/@currency"/>
- <Property name="*/@datatype"/>
- <Property name="*/@usage"/>
- <Property name="*/@regularAggregate"/>
- <Property name="*/@_effectivePromptInfo"/>
- <Property name="*/@displayType"/>
- <Property name="*/@semiAggregate"/>
- <Property name="*/@sortOnRef"/>
- <Property name="*/@parentChild"/>
- <Property name="*/@calcType"/>
- <Property name="measure/@isHierarchical"/>
- <Property name="dimension/@type"/>
- <Property name="./dimension"/>
- <Property name="./hierarchy"/>
- <Property name="./hierarchyFolder"/>
- <Property name="./level"/>
- <Property name="./measure"/>
- <Property name="*/@_IntrinsicPropertiesOff"/>
- <Property name="measure/aggregateRule"/>
- <Property name="*/@applyAggregate"/>
- </Properties>
- </Metadata>
- </metadataRequest>
- </bus:value>
- </bus:specification>
- <xsl:choose>
- <xsl:when test="/root/rptSvcParam">
- <bus:parameterValues xsi:type="bus:parameterValueArray" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <item>
- <bus:name xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam/@name"/></bus:name>
- <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
- <item xsi:type="bus:simpleParmValueItem">
- <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
- <bus:display xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam"/></bus:display>
- <bus:use xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam"/></bus:use>
- </item>
- </bus:value>
- </item>
- </bus:parameterValues>
- </xsl:when>
- <xsl:when test="key('env-param', 'parameterValues') != '' and contains(key('env-param', 'parameterValues'), 'item')">
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:value-of select="string(key('env-param', 'parameterValues'))" disable-output-escaping="yes"/>
- </bus:parameterValues>
- </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='xxCreds']">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </xsl:for-each>
- <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>
- <xsl:template name="breakSelection">
- <xsl:param name="selection" select="''"/>
- <xsl:if test="$selection != ''">
- <xsl:variable name="nextBit"><xsl:if test="contains($selection,'].') and contains(substring-after($selection,']'),'.[')"><xsl:text/><xsl:value-of select="xtsext:substringBeforeLast(string($selection),'.[')"/><xsl:text/></xsl:if></xsl:variable>
- <xsl:value-of select="'<Path name="'"/><xsl:value-of select="xtsext:xmlencode(string($selection))"/><xsl:value-of select="'"/>'"/>
- <xsl:if test="$nextBit != ''"><xsl:call-template name="breakSelection"><xsl:with-param name="selection" select="$nextBit"/></xsl:call-template></xsl:if>
- </xsl:if>
- </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>
- <xts:block id="appendDocument" mode="interpret" processor="XSLT" type="exec" dependency="getContent 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">
- <xsl:variable name="markup-track">
- <xsl:apply-templates select="/root/output/*/*/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name()='tracking']/*[local-name()='conversationContext']" mode="markup"/>
- </xsl:variable>
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='m_tracking']"/>
- <xts:append select="/root/env">
- <param name="m_tracking">
- <xsl:value-of select="string($markup-track)"/>
- </param>
- </xts:append>
- <xsl:choose>
- <xsl:when test="key('env-param','metadataTree')">
- <xts:append select="/root">
- <metadataTree>
- <xsl:value-of select="substring-after(string(key('env-param','metadataTree')), '?>')" disable-output-escaping="yes"/>
- </metadataTree>
- </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>
- </xts:append>
- </xsl:when>
- <xsl:when test="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportStatus']/bus:status = 'prompting'">
- <xts:delete select="/root/env/param[@name='htmlFragment']"/>
- <xts:append select="/root/env">
- <param name="htmlFragment">
- <xsl:value-of select="./response/*/*[local-name()='Body']/*/*/*[local-name()='details']/item[@xsi:type='bus:asynchDetailReportOutput']/bus:outputPages/item"/>
- </param>
- </xts:append>
- </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:value-of select="string($markup-track)"/>
- </working>
- </xsl:when>
- <xsl:when test="./response/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']">
- <metadataTree>
- <xsl:choose>
- <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="./response/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='waitResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </metadataTree>
- </xsl:when>
- <xsl:otherwise>
- <metadataTree>
- <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:otherwise>
- <xsl:value-of select="./*[local-name()='runSpecificationResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </metadataTree>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/plain" condition="(not(/root/response/*/*/*/*/*[local-name()='status']='working' or /root/response/*/*/*/*/*[local-name()='status']='stillWorking')) and (/root/metadataTree/ResponseRoot or /root/soapFault)" dependency="appendDocument">
- <!-- 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="text" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:choose>
- <xsl:when test="./metadataTree/ResponseRoot">
- <xsl:apply-templates select="./metadataTree/ResponseRoot"/>
- </xsl:when>
- <xsl:when test="./working">
- <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="/root/cookies/cookie[@name='cam_passport']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>working;<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='contextNodeRef']))"/>;<xsl:value-of select="xtsext:javascriptencode(string(xtsext:cafaction(concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(./working), true()))))"/>;<xsl:text/>
- <xsl:if test="key('env-param', 'depth')!=''">
- <xsl:value-of select="xtsext:javascriptencode(string(key('env-param','depth')))"/>
- </xsl:if>
- </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="./*[local-name()='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='contextNodeRef']))"/>;<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:choose>
- <xsl:apply-templates select="./logonFault"/>
- <xsl:apply-templates select="./soapFault"/>
- </xsl:template>
- <xsl:template match="/root/metadataTree/ResponseRoot">
- <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:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="/root/env/param[@name='contextNodeRef']"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>;<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="/root/metadataTree/ResponseRoot/package/@name"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>;<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="/root/metadataTree/ResponseRoot/package/@screenTip"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:variable name="depth">0</xsl:variable>
- <xsl:for-each select="./folder | ./querySubject | ./queryItemFolder | ./dimension | ./hierarchy | ./level | ./measure | ./measureFolder | ./hierarchyFolder">
- <xsl:variable name="parent"><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="@_path"/></xsl:with-param></xsl:call-template></xsl:variable>
- <xsl:variable name="parentRefExpression"><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="@_ref"/></xsl:with-param></xsl:call-template></xsl:variable>
- <xsl:choose>
- <xsl:when test="name()='dimension' and count(./hierarchy)=1 and count(*)=1 and (not(./hierarchy[@parentChild]) or ./hierarchy[@parentChild!='1'])">
- <xsl:choose>
- <!-- <xsl:when test="/root/env/param[@name='depth']='2' and (string(/root/env/param[@name='selectNode'])='' or string(/root/env/param[@name='startAtPath'])!='')">resubmitSingleHierarchy;<xsl:text/> -->
- <xsl:when test="/root/env/param[@name='depth']='2' and string(/root/env/param[@name='startAtPath'])!=''">resubmitSingleHierarchy;<xsl:text/>
- <xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="./hierarchy/@_path"/></xsl:with-param></xsl:call-template>
- <xsl:text/>;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="./hierarchy/@name"/></xsl:with-param></xsl:call-template>
- <xsl:text/>;<xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="./hierarchy/@_ref"/></xsl:with-param></xsl:call-template>
- <xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="./hierarchy"/>
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="depth" select="$depth"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="parent" select="$parent"/>
- <xsl:with-param name="depth" select="$depth"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="/root/logonFault">
- <xsl:text/>FAULT;timeout<xsl:text/>
- </xsl:template>
- <xsl:template match="/root/soapFault">
- <xsl:variable name="markup">
- <xsl:choose>
- <xsl:when test=".//bus:message">
- <xsl:for-each select=".//bus:message">
- <xsl:text/>;busMessageDetail,<xsl:text/>
- <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:text/>;busDetail<xsl:text/>
- <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:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:text/>FAULT;busMessage,<xsl:text/><xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">CCC-TLE-0001 <xts:string id="IDS_ERR_TLE_0001"/></xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:text/><xsl:value-of select="$markup"/><xsl:text/>
- </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>
- <xsl:template name="buildTreeItemResponseString">
- <xsl:param name="node"/>
- <xsl:param name="parent"/>
- <xsl:param name="depth"/>
- <xsl:param name="parentRefExpression"/>
- <xsl:for-each select="$node/*">
- <xsl:text/>;<xsl:text/>
- <xsl:if test="position()=1">
- <xsl:text/>firstChild<xsl:text/>
- </xsl:if>
- <xsl:if test="position()=last()">
- <xsl:text/>lastChild<xsl:text/>
- </xsl:if>
- <xsl:if test="not((position()=1) or (position()=last()))">
- <xsl:text/>child<xsl:text/>
- </xsl:if>
- <xsl:text/><xsl:value-of select="xtsext:javascriptencode(string($depth))"/>,<xsl:text/>
- <xsl:choose>
- <xsl:when test="@isNamespace='1'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">namespace</xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@isHierarchical='1'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">rollupMeasure</xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@type='3'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">measureDimension</xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@calcType='1'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">namedSet</xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:when test="@calcType='2'">
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal">calculationConstant</xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="name()"/></xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="@name"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="@screenTip"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="@_path"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="@_ref"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:if test="not(name()='folder' or name()='querySubject' or name()='queryItemFolder' or name()='filter' or name()='dimension' or name()='hierarchy' or name()='hierarchyFolder')">
- <xsl:call-template name="buildQueryItemResponseString"><xsl:with-param name="node" select="."/></xsl:call-template>
- </xsl:if>
- <xsl:text/>,<xsl:value-of select="xtsext:javascriptencode(string($parent))"/><xsl:text/>
- <xsl:text/>,<xsl:value-of select="xtsext:javascriptencode(string($parentRefExpression))"/><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode">
- <xsl:with-param name="strVal">
- <xsl:value-of select="@description"/>
- </xsl:with-param>
- </xsl:call-template><xsl:text/>
- <xsl:if test="(name()='hierarchy' or name()='hierarchyFolder') and @parentChild='1'">
- <xsl:text/>,parentChild<xsl:text/>
- </xsl:if>
- <!-- <xsl:if test="/root/env/param[@name='processRecursion']='1' or string(/root/env/param[@name='selectNode'])!=''"> -->
- <xsl:if test="/root/env/param[@name='processRecursion']='1'">
- <xsl:choose>
- <xsl:when test="name()='dimension' and count(./hierarchy)=1 and count(*)=1 and (not(./hierarchy[@parentChild]) or ./hierarchy[@parentChild!='1'])">
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="./hierarchy"/>
- <xsl:with-param name="parent" select="$node"/>
- <xsl:with-param name="depth" select="$depth + 1"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="buildTreeItemResponseString">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="parent" select="$node"/>
- <xsl:with-param name="depth" select="$depth + 1"/>
- <xsl:with-param name="parentRefExpression" select="$parentRefExpression"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="buildQueryItemResponseString">
- <xsl:param name="node"/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@datatype"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@usage"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@regularAggregate"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@semiAggregate"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@promptType"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@displayType"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@sortOnRef"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@promptCascadeOnRef"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@promptFilterItemRef"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="position()-1"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@currency"/></xsl:with-param></xsl:call-template><xsl:text/>
- <xsl:text/>,<xsl:call-template name="commaAndSemicolonEncode"><xsl:with-param name="strVal"><xsl:value-of select="$node/@promptUseItemRef"/></xsl:with-param></xsl:call-template><xsl:text/>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="//*[local-name()='CAM']/*[local-name()='exception']//*[local-name()='promptInfo'] or contains(//*[local-name()='exception']/*[local-name()='message']/*[local-name()='messageString'], 'QE-DEF-0313')">
- <logonFault>timeout</logonFault>
- </xsl:when>
- <xsl:otherwise>
- <soapFault>
- <xsl:copy>
- <xsl:copy-of select="/root/fault"/>
- </xsl:copy>
- </soapFault>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|