123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373 |
- <?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">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt"/>
- <!--
- ===============================================================================================
- decodeAgentDefinitionBlob - Decode the agent definition blob and then append the agent_definition here so we can create the tasks.
- ===============================================================================================
- -->
- <xts:block id="decodeAgentDefinitionBlob" dependency="formlogic_init" processor="XSLT" type="exec" condition=".[/root/env/param[@name = 'agent_definition_blob'] and /root/env/param[@name = 'agent_definition_blob']!='']" mandatory="false" nodelist="env,agent_definition">
- <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.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:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinitionblob_settemplateid_summarybarupdate001', string( /root/env/param[@name = 'agent_definition_blob'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- decodeItems - Decode the ordered task id list
- The new ordering is specified by the following xml :
- <items>
- <item id='id1"/>
- <item id='id3"/>
- <item id='id2"/>
- <item id='id5"/>
- <item id='id4"/>
- </items>
- ===============================================================================================
- -->
- <xts:block id="decodeItems" nodelist="env" processor="XSLT" type="exec" condition=".[/root/env/param[@name = 'item2move']]" dependency="decodeAgentDefinitionBlob" mandatory="false">
- <xsl:stylesheet 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"
- version="1.0" exclude-result-prefixes="xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!-- decode the data items and meta data that wraps them -->
- <xts:append select="/root">
- <xts:transform name="XMLDecode">
- <xsl:value-of select="/root/env/param[@name='item2move']"/>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===================================================================================================================
- update agent sequencing - this block will only be entered when the SeqTasks parameter exists and where it differs from the value present in the AgentDefinition
- ===================================================================================================================
- -->
- <xts:block id="updateAgentSequencing" processor="XSLT" type="exec" nodelist="env,agent_definition" mandatory="false" dependency="decodeItems"
- condition=".[/root/env/param[@name = 'SeqTasks'] and /root/env/param[@name = 'SeqTasks']!='' and /root/agent_definition/sequencing != /root/env/param[@name = 'SeqTasks']]">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="/root/env/param[@name='SeqTasks']">
- <!-- update the agent definition -->
- <xts:update select="/root/agent_definition/sequencing">
- <sequencing>
- <xsl:value-of select="/root/env/param[@name='SeqTasks']"/>
- </sequencing>
- </xts:update>
- <!-- set the flag to indicate that the agent definition needs to be blobbed up again with the new sequencing value-->
- <xts:append select="/root/env">
- <param name="sequencingUpdated">true</param>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- updateItemOrder - reorder the agent definition item list
- ===============================================================================================
- -->
- <xts:block id="updateItemOrder" dependency="updateAgentSequencing" processor="XSLT" type="exec" nodelist="env,temp,items,agent_definition" condition=".[/root/items]" mandatory="false">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <temp>
- <items>
- <xsl:for-each select="/root/items/item">
- <xsl:variable name="taskId" select="./@id"/>
- <xsl:copy-of select="/root/agent_definition/items/item[id=$taskId]"/>
- </xsl:for-each>
- </items>
- </temp>
- </xts:append>
- <xts:delete select="/root/agent_definition/items"/>
- <xts:append select="/root/agent_definition">
- <xts:queryNode select="/root/temp/items"/>
- </xts:append>
- <!-- set the flag to indicate that the agent definition needs to be blobbed up again with the new sequencing value-->
- <xts:append select="/root/env">
- <param name="sequencingUpdated">true</param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===================================================================================================================
- tidy up
- ===================================================================================================================
- -->
- <xts:block id="tidy" processor="XSLT" type="exec" nodelist="env,temp" mandatory="false" dependency="updateItemOrder">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='SeqTasks']"/>
- <xts:delete select="/root/env/param[@name = 'agent_definition_blob']"/>
- <xts:delete select="/root/temp"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- encodeAgentDefinition- blob up the agent definition if we need to i.e. the sequencing parameter has changed
- ===============================================================================================
- -->
- <xts:block id="encodeAgentDefinition" dependency="tidy" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name = 'sequencingUpdated']='true' ]" nodelist="env,credential,cookies,agent_definition">
- <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: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" select="/root/agent_definition"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="agent_definition_blob">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_encodeagentdefinition_settemplateid_summarybarupdate001'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- summarybar- render the summary bar HTML and place it in /root/summaryContent
- ===============================================================================================
- -->
- <xts:block id="summarybarVars" type="exec" processor="XSLT" dependency="encodeAgentDefinition">
- <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="xsl xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <sb>
- <param name="tabSelectedID">
- <xsl:value-of select="/root/env/param[@name='tabSelectedID']"/>
- </param>
- <param name="prevTabID">
- <xsl:value-of select="/root/env/param[@name='prevTabID']"/>
- </param>
- <param name="itemSelected">
- <xsl:value-of select="/root/env/param[@name='itemSelected']"/>
- </param>
- <param name="itemNewLocation">
- <xsl:value-of select="/root/env/param[@name='itemNewLocation']"/>
- </param>
- <param name="cafcontextid">
- <xsl:value-of select="/root/env/param[@name='cafcontextid']"/>
- </param>
- </sb>
- </xts:append>
- <xts:delete select="/root/env/param[@name='tabSelectedID']"/>
- <xts:delete select="/root/env/param[@name='prevTabID']"/>
- <xts:delete select="/root/env/param[@name='newTaskType']"/>
- <xts:delete select="/root/env/param[@name='itemSelected']"/>
- <xts:delete select="/root/env/param[@name='itemNewLocation']"/>
- <xts:delete select="/root/env/param[@name='cafcontextid']"/>
- <xts:delete select="/root/env/param[@name='hid']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="summarybar" type="exec" processor="XSLT" dependency="summarybarVars">
- <!-- stuff for the summaryBar -->
- <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- presentation stuff -->
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="xsl">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <summaryBar>
- <xts:transform name="XMLEncode">
- <xts:transform src="/ags/summarybar.xslt" processor="XSLT">
- <xts:param name="logicsheet">ags/logicsheets/agentDefinition.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/controls/presentation.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/controls/framework.xsl</xts:param>
- <xts:param name="messageBase">messages/AGS.xml</xts:param>
- <xts:param name="messageBase">messages/portal.xml</xts:param>
- <xts:param name="messageBase">messages/portalRL.xml</xts:param>
- <root>
- <env>
- <xsl:copy-of select="/root/env/*"/>
- </env>
- <agent_definition>
- <xsl:copy-of select="/root/agent_definition/*"/>
- </agent_definition>
- <sb>
- <xsl:copy-of select="/root/sb/*"/>
- </sb>
- <!-- system -->
- <xsl:copy-of select="/root/system"/>
- <!-- http -->
- <xsl:copy-of select="/root/http"/>
- <!-- session -->
- <xsl:copy-of select="/root/session"/>
- <!-- credential -->
- <xsl:copy-of select="/root/credential"/>
- <!-- cookies-->
- <xsl:copy-of select="/root/cookies"/>
- </root>
- </xts:transform>
- </xts:transform>
- </summaryBar>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- ===============================================================================================
- Process the suppression rules if need be, and prepare an html fragment that will then be used for any visible task.
- ===============================================================================================
- -->
- <xts:block id="processSuppression" path="/ags/processSuppression.xslt" dependency="summarybar" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- presentation stuff -->
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup - Produce the much needed XML response
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" mode="output" mimeType="application/xml; charset=utf-8" processor="XSLT" dependency="processSuppression">
- <!-- 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/agentDefinition.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:agsad="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agentDefinition/"
- xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
- exclude-result-prefixes="xsl out agsad ut">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <!-- 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="/">
- <summaryBarResponse>
- <markup>
- <xsl:value-of select="/root/summaryBar"/>
- </markup>
- <xsl:if test="/root/env/param[@name='sequencingUpdated']='true'">
- <taskSequence><xsl:value-of select="/root/agent_definition/sequencing"/></taskSequence>
- <blobby><xsl:value-of select="/root/env/param[@name='agent_definition_blob']"/></blobby>
- </xsl:if>
- <isCurrentFailureTask><xsl:value-of select="/root/suppressionDetails/@isCurrentFailureTask"/></isCurrentFailureTask>
- <suppressionDetails><xsl:value-of select="/root/suppressionDetails"/></suppressionDetails>
- <!-- report task run option summary string-->
- <xsl:variable name="ro" select="/root/agent_definition/agentOptions/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']"/>
- <reportOptionSummary>
- <xsl:choose>
- <xsl:when test="/root/agent_definition/agentOptions/form-vars/param[@name='override_default_options']='true'">
- <xsl:call-template name="ut:buildRunOptionSummary">
- <xsl:with-param name="summaryPath" select="/root/agent_definition/agentOptions/*[local-name()='UIHelpers']"/>
- <xsl:with-param name="outputFormat" select="$ro[./*[local-name()='name']='outputFormat']/*[local-name()='value']/*"/>
- <xsl:with-param name="outputLocale" select="$ro[./*[local-name()='name']='outputLocale']/*[local-name()='value']/*"/>
- <xsl:with-param name="saveAsReportView" select="$ro[./*[local-name()='name']='saveAs' and ./*[local-name()='objectClass']='reportView']"/>
- <xsl:with-param name="save" select="$ro[./*[local-name()='name']='saveOutput']/*[local-name()='value'] = 'true'"/>
- <xsl:with-param name="saveAsName" select="$ro[./*[local-name()='name']='saveAs' and ./*[local-name()='objectClass']='reportView']/*[local-name()='objectName']/*[local-name()='item']/*[local-name() ='value']"/>
- <xsl:with-param name="print" select="$ro[./*[local-name()='name']='print']/*[local-name()='value'] = 'true'"/>
- <xsl:with-param name="email" select="$ro[./*[local-name()='name']='email']/*[local-name()='value'] = 'true'"/>
- <xsl:with-param name="burst" select="$ro[./*[local-name()='name']='burst']/*[local-name()='value'] = 'true'"/>
- <xsl:with-param name="contentTaskOption" select="$ro[./*[local-name()='name']='repairSecurityReferences']/*[local-name()='value']"/>
- <xsl:with-param name="deploymentUpgradeOption" select="$ro[./*[local-name()='name']='upgradeClasses']"/>
- <xsl:with-param name="jobDefinition" select="false()"/>
- <xsl:with-param name="contentTask" select="true()"/>
- <xsl:with-param name="deployment" select="true()"/>
- <xsl:with-param name="detailed" select="false()"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise><xts:string id="IDS_OTHERRUN_DEFAULT"/></xsl:otherwise>
- </xsl:choose>
- </reportOptionSummary>
- </summaryBarResponse>
- </xsl:template>
- <agsad:taskSuppressionStateText/>
- <ut:buildRunOptionSummary/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|