12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <?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.
- -->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:req-params="http://developer.cognos.com/schemas/request/params"
- xmlns:xts="http://developer.cognos.com/schemas/xts/" exclude-result-prefixes="xtsext pf req-params xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <pf:serialize-xml/>
- <xsl:template match="/">
- <xsl:variable name="prevTabID" select="/root/env/param[@name='prevTabID']"/>
- <!-- get the type of the selected tab - either the condition/summary/ or one of the agent/report/job etc types
- tabSelectedID actually can hold either a type - or a task id. Have to handle both -->
- <xsl:variable name="selTabType">
- <xsl:choose>
- <!-- we have a reference to a task -->
- <xsl:when test="/root/agent_definition/items/item[./id = $prevTabID]">
- <xsl:value-of select="/root/agent_definition/items/item[./id = $prevTabID]/type"/>
- </xsl:when>
- <!-- we have a type - so use that -->
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='prevTabID']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="target">
- <xsl:value-of select="/root/navigator/page[@name=$selTabType]/link"/>
- </xsl:variable>
- <xts:sequence>
- <!-- Call the morphlet -->
- <xts:append select="/root">
- <xts:request name="BUS" target="bus://xts2{$target}" option="xml" outputHeader="true">
- <req-params:requestParams>
- <req-params:param name="requestState">
- <xsl:value-of select="'finished'"/>
- </req-params:param>
- <req-params:param name="resultNode">
- <xsl:text>morphletResponse</xsl:text>
- </req-params:param>
- <req-params:param name="inWizard">
- <xsl:text>false</xsl:text>
- </req-params:param>
- <req-params:param name="agentStudio">
- <xsl:text>true</xsl:text>
- </req-params:param>
- <req-params:param name="taskName">
- <xsl:value-of select="/root/agent_definition/items/item[./id = $prevTabID]/name"/>
- </req-params:param>
- <req-params:param name="taskType">
- <xsl:value-of select="/root/env/param[@name='taskType']"/>
- </req-params:param>
- </req-params:requestParams>
- <!-- env -->
- <xsl:copy-of select="/root/env"/>
- <!-- system -->
- <xsl:copy-of select="/root/system"/>
- <!-- user -->
- <xsl:copy-of select="/root/user"/>
- <!-- http -->
- <xsl:copy-of select="/root/http"/>
- <!-- session -->
- <xsl:copy-of select="/root/session"/>
- <!-- header-->
- <xsl:copy-of select="/root/header"/>
- <!-- credential -->
- <xsl:copy-of select="/root/credential"/>
- <!-- cookies-->
- <xsl:copy-of select="/root/cookies"/>
- </xts:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|