123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2008
- 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>
- <!--
- ================================================================================
- whip out the parameters that were saved off previously
- ===============================================================================================
- -->
- <xts:block id="decodeExistingParameters" path="/ags/parameters/decodeExistingParameters.xslt" dependency="moveContext" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
- If we have been through this dialog before we will have saved or unsaved parameter values to display, so whip them out
- from the parameter named taskParameters. this contains the previously saved param values retrieved in loadAgent and any unsaved updates
- from previous passes through this dialog
-
- ===============================================================================================
- -->
- <xts:block id="checkExistingParameters" path="/ags/parameters/checkExistingParameters.xslt" dependency="decodeExistingParameters" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
-
- We also may have just come back from a jauort server, so update this info with any new parameter values
- ===============================================================================================
- -->
- <xts:block id="mergeLiteralParameters" path="/ags/parameters/mergeLiteralParameters.xslt" dependency="checkExistingParameters" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- ProcessResponse - Process the response of the call and transform it into a standard xml structure
- Remove the bus name space and keep the same structure.
- ===============================================================================================
- -->
- <xts:block id="processResponse" mode="interpret" dependency="mergeLiteralParameters" condition=".[/root/*[local-name()='Envelope']/*[local-name()='Body']]" mandatory="false" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="xsl bus xsi">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xts:sequence>
- <xts:append>
- <parametersResponse>
- <parameter>
- <!-- have to get the parameter definitions + parameters which might be returned -->
- <xsl:for-each select="/root/*[local-name()='Envelope']/*[local-name()='Body']/*/bus:result/bus:details/item[@xsi:type='bus:asynchDetailParameters']/bus:parameters/item">
- <item>
- <xsl:apply-templates/>
- </item>
- </xsl:for-each>
- </parameter>
- </parametersResponse>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template match="node()">
- <xsl:element name="{local-name(.)}">
- <xsl:apply-templates/>
- </xsl:element>
- </xsl:template>
- <xsl:template match="text()">
- <xsl:value-of select="."/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- Append the parameters.
- ================================================================================
- -->
- <xts:block id="generateExistingParameters" dependency="processResponse" processor="XSLT" type="exec" condition=".[not(/root/*[local-name()='Envelope']/*[local-name()='Body'])]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <parametersResponse>
- <parameter>
- <xsl:apply-templates select="/root/agent_item//name"/>
- <xsl:apply-templates select="/root/agent_item//parameterName"/>
- <capabilities><item>optional</item></capabilities>
- </parameter>
- </parametersResponse>
- <displayedPage quote-string="'">report</displayedPage>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template match="name">
- <xsl:element name="item">
- <xsl:element name="name"><xsl:value-of select="."/></xsl:element>
- <xsl:element name="capabilities">optional</xsl:element>
- </xsl:element>
- </xsl:template>
- <xsl:template match="parameterName">
- <xsl:element name="item">
- <xsl:element name="name"><xsl:value-of select="."/></xsl:element>
- <xsl:element name="capabilities">optional</xsl:element>
- </xsl:element>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- check that we have all the parameters, even those without saved values
- and produce a block of xml to be used by the display that contains all the parameters and any parameter values that may have been
- saved or recently generated by this page via the rs or the model insert button
- remove any saved params that are no longer valid
- ===============================================================================================
- -->
- <xts:block id="mergeParameters" path="/ags/parameters/mergeParameters.xslt" dependency="generateExistingParameters" processor="XSLT" type="exec" mandatory="false">
- </xts:block>
- <!--
- ================================================================================
- decode the the model item parameters from the form fields and update the parameters block
- ===============================================================================================
- -->
- <xts:block id="mergeModelParameters" path="/ags/parameters/mergeModelParameters.xslt" processor="XSLT" type="exec" mode="interpret" dependency="mergeParameters" mandatory="false"/>
- <!--
- ================================================================================
- if We have just come back from a jaunt round the report server, update the agent task blob
- ===============================================================================================
- -->
- <xts:block id="createParametersBlob" path="/ags/parameters/createParametersBlob.xslt" dependency="mergeModelParameters" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- get connection parameter info for the display
- ===============================================================================================
- -->
- <xts:block id="expandCredentialInfomation" path="/ags/parameters/expandCredentialInformation.xslt" dependency="createParametersBlob" processor="XSLT" type="exec" mandatory="false" condition=".[/root/agent_item/parameterData/*[local-name()='parameterValues']]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ===============================================================================================
- retrieve datasource connection information for the display
- ===============================================================================================
- -->
- <xts:block id="getCredentialInformation" path="/ags/parameters/getCredentialInformation.xslt" dependency="expandCredentialInfomation" processor="XSLT" type="exec" mandatory="false" condition=".[/root/credentialParameters/credentialParameter]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- ================================================================================
- Append the report path to the agent path.
- ===============================================================================================
- -->
- <xts:block id="appendDisplayedPageType" dependency="getCredentialInformation" processor="XSLT" type="exec" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='displayedPage'] = 'sql'">
- <displayedPage quote-string="">sql</displayedPage>
- </xsl:when>
- <xsl:otherwise>
- <displayedPage quote-string="'">report</displayedPage>
- </xsl:otherwise>
- </xsl:choose>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- create a data structure for the display to work on....
- take the report server parameters as the basis and include the default literal summary and model values
-
- format:
- <parametersDisplay>
- <parameter name="... identifier" caption="localised dislpay name" multivalued="true/false" required="true/false" type="" literalValue="" modelValue=""/>
- </parametersDisplay>
- ===============================================================================================
- -->
- <xts:block id="createDisplayData" path="/ags/parameters/createDisplayData.xslt" dependency="appendDisplayedPageType" processor="XSLT" type="exec" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- </xts:block>
-
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="createDisplayData" condition=".[/root/displayedPage/text() != 'sql']" mandatory="false">
- <!-- logicsheets -->
- <xts:logicsheet path="ags/logicsheets/promptValues.xslt"/>
- <xts:logicsheet path="ags/logicsheets/run_options.xslt"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <xts:logicsheet path="ags/logicsheets/condition-ui-templates.xslt"/>
- <!-- 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:out="http://www.w3.org/1999/XSL/Transform" xmlns:agspmt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/promptValues/" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" 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: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:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/" xmlns:agsro="http://developer.cognos.com/schemas/xts/agsro" exclude-result-prefixes="xsl out agspmt agsdlg xsi cm pf xtsext lyt dp df cf cp xos utml ut agsro">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <xsl:variable name="jobDefinition" select="false()"/>
- <xsl:variable name="spacer">
- <img height="10" width="10">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:variable>
- <!-- 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">
- <getParametersResponse>
- <markup>
- <xts:transform name="XMLEncode">
- <xsl:call-template name="promptValues"/>
- </xts:transform>
- </markup>
- <!-- take a copy of the parameter display element - which is very nicely formatted -->
- <xsl:copy-of select="/root/parametersDisplay"/>
- </getParametersResponse>
- </xts:transform>
- </asyncReply>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <agspmt:promptValues/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|