123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- +=========================================================================================+
- | Licensed Materials - Property of IBM
- | BI and PM: prmt
- | (C) Copyright IBM Corp. 2002, 2013
- |
- | US Government Users Restricted Rights - Use, duplication or
- | disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- |
- =========================================================================================+
- -->
- <xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:block id="parseURL" path="rv/logicsheets/parseURL.xslt" type="exec" processor="XSLT" mandatory="false"/>
- <xts:block id="parseFault" dependency="parseURL" type="exec" mode="interpret" mimeType="text/xml" condition=".[/root/env/param[@name = 'fault']]" processor="XSLT" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <faultSpec>
- <xsl:value-of select="/root/env/param[@name='fault']" disable-output-escaping="yes"/>
- </faultSpec>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="init" dependency="parseURL parseFault" type="exec" mode="interpret" mimeType="text/html" processor="XSLT" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xtsext">
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <promptSpec>
- <xsl:for-each select="/root/faultSpec">
- <xsl:apply-templates/>
- </xsl:for-each>
- <xsl:value-of select="/root/env/param[@name='specification']" disable-output-escaping="yes"/>
- <PAGE layoutClass="page" name="Prompt Page4" class="pp" >
- <OTR layoutClass="tableRow">
- <OTD layoutClass="pageFooter" defaultPromptFooter="true" promptRunOption="true" cid="0" uid="12" type="summary" class="fp"/>
- </OTR>
- </PAGE>
- </promptSpec>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template match="faultcode | faultstring | faultSubcode | faultSubstring | */name[@value] | */searchPath[@value]">
- <xsl:variable name="att_name" select="name()"/>
- <xsl:attribute name="{$att_name}">
- <xsl:choose>
- <xsl:when test="@value">
- <xsl:value-of select="@value"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </xsl:template>
- <!-- creates attributes dataSourcName, faultConnectionName and faultConnectionSearchPath -->
- <xsl:template match="dataSource/name | faultConnection/name | faultConnection/searchPath">
- <xsl:variable name="n" select="name()"/>
- <xsl:variable name="att_name" select="concat( name(..), translate(substring($n,1,1),'ns','NS'), substring($n,2) )"/>
- <xsl:attribute name="{$att_name}"><xsl:value-of select="@value"/></xsl:attribute>
- </xsl:template>
- <xsl:template match="dataSource/connection | connection/signon">
- <xsl:variable name="n" select="name()"/>
- <xsl:element name="{$n}">
- <xsl:if test="name/@value = ../name/@value">
- <xsl:attribute name="selected">true</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </xsl:element>
- </xsl:template>
- <xsl:template match="Fault|SOAP-ENV:Fault" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <selectDataSourceSignon>
- <xsl:attribute name="parameter"><xsl:value-of select="generate-id()"/></xsl:attribute>
- <xsl:if test="/root/session/param[@name='capabilities']/canUsePersonalDataSourceCredentials">
- <xsl:attribute name="persistPrompt">true</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </selectDataSourceSignon>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="render" dependency="init" type="exec" mode="output" mimeType="text/html" processor="XSLT" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="rv/logicsheets/rvlogic.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
- xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:rvl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/rv/rvlogic/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- exclude-result-prefixes="xos pf mt mf xtsext cf cp bus xts dp SOAP-ENV xhtml rvl">
- <xsl:import href="p_include.xsl"/>
- <xsl:output method="html" encoding="utf-8" indent="no"/>
- <pf:variables/>
- <!-- current file name -->
- <xsl:variable name="skin" select="'corporate'"/>
- <xsl:variable name="promptLocale" select="$contentLocale"/>
- <xsl:variable name="promptFormName" select="'formWarpRequest'"/>
- <xsl:variable name="mname" select="'getPrompt.xts'"/>
- <xsl:template match="/root">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="{$webRoot}/reportstyles/GlobalReportStyles.css"/>
- <xsl:call-template name="getPromptCommonIncludes"/>
- <script type="text/javascript" charset="utf-8" src="{$webRoot}/prompting/pds.js"></script>
- <script type="text/javascript" charset="utf-8">
- function promptButtonOK()
- {
- var s = "";
- var r = cognos.Report.getReport("_THIS_");
- var a = getPreProcessControlArray();
- var paramValues = [];
- for (var i = 0; i < a.length; i++) {
- var o = ( (typeof a[i]) == "string" ? window[a[i]] : a[i]);
- if (o && o.sGetValue) {
- paramValues.push( o.sGetValue() );
- }
- else if (o && o.preProcess) {
- paramValues.push( o.preProcess() );
- }
- }
- F_pdsCallback(
- {
- "parameters": paramValues,
- "state": "OK"
- },
- "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_invoke')))"/>"
- );
- }
- function promptButtonFinish() { promptButtonOK(); }
- function promptButtonNext() { promptButtonOK(); }
- function promptButtonCancel()
- {
- F_pdsCallback(
- {"state":"Cancel"},
- "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'ccs_invoke')))"/>"
- );
- }
- </script>
- </head>
- <body>
- <form name="formWarpRequest" method="get">
- <xsl:for-each select="/root/promptSpec/*">
- <xsl:apply-templates select="." /><br/><br/>
- </xsl:for-each>
- </form>
- </body>
- </html>
- </xsl:template>
- <!--pf:serialize-xml/-->
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|