123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2018
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl xos pf mt mf xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="key('env-param', 'm')"/>
- <pf:variables/>
- <xsl:template match="/root">
- <xsl:variable name="detailStatusIsPrompting" select="string(/root/response/*/*/*[contains(local-name(), 'Response')]/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='status'])='prompting'"/>
- <xts:sequence>
- <xts:replace select="/root/output/*[local-name() = 'part']">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:variable name="isComplete" select="(/root/resultStatus='conversationComplete' or /root/resultStatus='complete')"/>
- <xsl:element name="{local-name(/root/command/*)}Response" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
- <xsl:variable name="asynchDetailParameterValues" select="/root/response/*/*/*[local-name()='collectParameterValuesResponse']/*[local-name()='result']/*[local-name()='details']/*[local-name()='item' and contains(@xsi:type, 'asynchDetailParameterValues')]"/>
- <xsl:choose>
- <!-- prompt information supplied by collect. Ensure that something was returned -->
- <xsl:when test="(count($asynchDetailParameterValues) > 0) and $isComplete and not($detailStatusIsPrompting)">
- <parameters>
- <xts:transform src="transforms/portal/parameters/post-WARP-process.xslt" processor="XSLT">
- <xsl:copy-of select="$asynchDetailParameterValues"/>
- </xts:transform>
- </parameters>
- </xsl:when>
- <xsl:when test="/root/command/*/getParametersRequest and (/root/resultStatus='conversationComplete' or /root/resultStatus='complete')">
- <xsl:copy-of select="/root/response/*/*/*[local-name()='getParametersResponse']/*[local-name()='result']/*[local-name()='details']/*[local-name()='item' and contains(@xsi:type, 'asynchDetailParameters')]/*"/>
- </xsl:when>
- <xsl:when test="/root/command/*/metaDataRequest and string(/root/env/param[@name='execMethod'])='metadata' and /root/response/*/*/*[contains(local-name(),'Response')]/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='metadata'] and ((/root/resultStatus='conversationComplete' or /root/resultStatus='complete') and not($detailStatusIsPrompting))">
- <xsl:if test="/root/env/param[@name='startScopeAt'] or /root/env/param[@name='startBMItemAt'] or /root/env/param[starts-with(@name,'startDataItemAt_')]">
- <metadataResponse>
- <xsl:if test="string(/root/response/*/*/*[contains(local-name(),'Response')]/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='metadata'])!=''">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="/root/response/*/*/*[contains(local-name(),'Response')]/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='metadata']"/>
- </xts:transform>
- </xsl:if>
- </metadataResponse>
- </xsl:if>
- </xsl:when>
- </xsl:choose>
- <status>
- <xsl:choose>
- <xsl:when test="/root/conversationStatus!=''">
- <xsl:value-of select="/root/conversationStatus"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/resultStatus"/>
- </xsl:otherwise>
- </xsl:choose>
- </status>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- <xsl:if test="(not(((/root/resultStatus='conversationComplete' or /root/resultStatus='complete') and not($detailStatusIsPrompting)) and (not(/root/command/*/*[local-name()='callFinish']) or /root/command/*/*[local-name()='callFinish']='false'))) or (not(/root/command/*/*[local-name()='showNoPromptsWarning']) or /root/command/*/*[local-name()='showNoPromptsWarning']='true')">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <html lang="{/root/session/param[@name='productLocale']}">
- <!-- copy in the head content -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'head']"/>
- <mt:page region="IDS_OTHERRUN_REPORT_PROMPTS">
- <div id="maincontent" style="height: 100%; width: 100%">
- <form name="formWarpRequest" id="formWarpRequest" method="post" style="height:100%;margin:0px">
- <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
- <tr><td height="100%">
- <!-- =============== R E P O R T B O D Y ============== -->
- <div>
- <xsl:choose>
- <xsl:when test="$browser = 'ie'">
- <xsl:attribute name="style">height:100%;border:0; padding:0;</xsl:attribute>
- <xsl:attribute name="class">reportViewerContent</xsl:attribute>
- </xsl:when>
- <xsl:when test="$browser = 'moz'">
- <xsl:attribute name="style">position:relative; left:0; top:1; width:100%; height:100%;border : 0px;</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="style">height:100%;border:0; padding:0;</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- <!-- An inner div for IE makes the scrolling work best -->
- <xsl:if test="$browser = 'ie'">
- <xts:function name="xmldecode">
- <xts:param name="source"><div style="position:absolute;height:100%;width:100%"></xts:param>
- </xts:function>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="/root/conversationStatus='prompting'">
- <!-- page is following the response as a "part" -->
- <xos:content refId="{response/xos:part/xos:entityBody/@refId}"/>
- </xsl:when>
- <xsl:when test="(/root/resultStatus='conversationComplete' or /root/resultStatus='complete') and (not(/root/command/*/*[local-name()='showNoPromptsWarning']) or /root/command/*/*[local-name()='showNoPromptsWarning']='true')">
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'noPromptsMessage']"/>
- </xsl:when>
- <xsl:when test="contains(' working stillWorking ', concat(' ', /root/resultStatus, ' '))">
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'waitPage']"/>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="$browser = 'ie'">
- <xts:function name="xmldecode">
- <xts:param name="source"></div></xts:param>
- </xts:function>
- </xsl:if>
- </div>
- </td></tr>
- </table>
- <!-- always copy in the bottomRow content -->
- <xsl:copy-of select="output/xos:part/xos:entityBody/xos:content[@id = 'bottomRow']"/>
- </form>
- </div>
- </mt:page>
- </html>
- </xos:entityBody>
- </xos:part>
- </xsl:if>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|