123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2009
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio">
- <!--
- ================================================================================
- decode the parameter context
- ===============================================================================================
- -->
- <xts:block id="decodeContext" processor="XSLT" type="exec">
- <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" exclude-result-prefixes="xsl xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- decode the agent items -->
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_dialogadapter001', string( /root/env/param[@name = 'context'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- <!-- get rid of the blob for the time being -->
- <xts:delete select="/root/env/param[@name = 'context']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- decode the agent items
- ===============================================================================================
- -->
- <xts:block id="moveContext" processor="XSLT" type="exec" dependency="decodeContext">
- <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" exclude-result-prefixes="xsl xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- decode the agent items -->
- <xts:append select="/root/env">
- <xsl:copy-of select="/root/context/env/*"/>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- appendMetadataToDocument - add the results of the requests into the right place
- ===============================================================================================
- -->
- <xts:block id="appendMetadataToDocument" mode="interpret" processor="XSLT" type="exec" dependency="moveContext" 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:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" 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/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append select="/root">
- <procedureDetails>
- <xsl:if test="/root/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:metadata">
- <xts:transform xmlns:xts="http://developer.cognos.com/schemas/xts/" name="XMLDecode">
- <xsl:value-of select="/root/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:metadata"/>
- </xts:transform>
- </xsl:if>
- </procedureDetails>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- make a default selection the first time we come to the page
- ===============================================================================================
- -->
- <xts:block id="doDefaultSelection" mode="interpret" dependency="appendMetadataToDocument" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xsl:variable name="selected_subject" select="/root/env/param[@name='sql_procedure_name']"/>
- <xts:sequence>
- <!-- when there is something in the update spec....-->
- <xsl:choose>
- <xsl:when test="/root/*[local-name()='procedureDetails']/*[local-name()='ResponseRoot']/*[local-name()='folder']/descendant::updateSubject[1]/@_ref">
- <xsl:choose>
- <!-- if there is already a param there then update it else add it -->
- <xsl:when test="$selected_subject!=''">
- <!-- we have an update subject... check its relevence if there is already a param there then update it else add it -->
- <xsl:if test="not(/root/*[local-name()='procedureDetails']/*[local-name()='ResponseRoot']/*[local-name()='folder']/descendant::updateSubject[@_ref = $selected_subject])">
- <xts:replace select="/root/env/param[@name='sql_procedure_name']">
- <param name="sql_procedure_name">
- <xsl:value-of select="/root/*[local-name()='procedureDetails']/*[local-name()='ResponseRoot']/*[local-name()='folder']/descendant::updateSubject[1]/@_ref"/>
- </param>
- </xts:replace>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xts:append select="/root/env">
- <param name="sql_procedure_name">
- <xsl:value-of select="/root/*[local-name()='procedureDetails']/*[local-name()='ResponseRoot']/*[local-name()='folder']/descendant::updateSubject[1]/@_ref"/>
- </param>
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xts:delete select="/root/env/param[@name='sql_procedure_name']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- encode the agent items again
- ================================================================================
- -->
- <xts:block id="buildContext" dependency="doDefaultSelection" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf cm xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="markup">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set">
- <xsl:call-template name="buildContext"/>
- </xsl:with-param>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="context">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_buildcontext_settemplateid_dialogadapter003'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <!-- build the context -->
- <xsl:template name="buildContext">
- <context>
- <env>
- <!-- the actual path to the report - which is needed in the call to getParameters -->
- <xsl:copy-of select="/root/env/param[@name='sql_procedure_name']"/>
- <param name="procedureDetails">
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set">
- <xsl:copy-of select="/root/procedureDetails"/>
- </xsl:with-param>
- </xsl:call-template>
- </param>
- <xsl:if test="/root/env/param[@name='sql_procedure_name'] != ''">
- <xsl:copy-of select="/root/env/param[@name='taskParameters']"/>
- <!-- the pv_ items - which is all the settings for parameters in the UI/drop down/input box -->
- <xsl:copy-of select="/root/env/param[starts-with(@name, 'pv_')]"/>
- </xsl:if>
- </env>
- </context>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="buildContext" mandatory="false">
- <!-- logicsheets -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- agent studio logicsheets -->
- <xts:logicsheet path="ags/logicsheets/arguments.xslt"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:agsarg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/arguments/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:req-params="http://developer.cognos.com/schemas/request/params" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:x="x" exclude-result-prefixes="agsarg xts xsl cm pf xtsext lyt dp df cf cp xos utml agsdlg x">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <pf:variables/>
- <!-- declared a variable to determine if a report has been selected, used for validation purposes-->
- <!-- determine which dialog to show when the set... options link is clicked-->
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <asyncReply>
- <xts:transform name="XMLEncode">
- <getSpDetailsResponse>
- <getSpPackage>
- <xsl:value-of select="/root/env/param[@name='sql_package']"/>
- </getSpPackage>
- <getSpDetails_context>
- <xsl:value-of select="/root/env/param[@name='context']"/>
- </getSpDetails_context>
- <getSpDetails_sp_name>
- <xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/>
- </getSpDetails_sp_name>
- <xsl:if test="not(/root/env/param[@name='sql_procedure_name']) or /root/soapFault">
- <markup>
- <xts:transform name="XMLEncode">
- <dp:list width="100%">
- <dp:section>
- <dp:label>
- <xts:string id="DIALOG_SQL_STOREDPROC"/>
- </dp:label>
- </dp:section>
- <dp:section>
- <xsl:choose>
- <xsl:when test="/root/soapFault">
- <xsl:text>
- <xts:string id="DIALOG_MESSAGE_NOT_AVAILABLE"/>
- </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>
- <xts:string id="DIALOG_MESSAGE_NONE"/>
- </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section>
- </dp:list>
- </xts:transform>
- </markup>
- </xsl:if>
- </getSpDetailsResponse>
- </xts:transform>
- </asyncReply>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|