123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2017
- 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/portal.xml,messages/AGS.xml,messages/portalRL.xml" requiredCapability="canUseEventStudio">
-
- <!--
- ===============================================================================================
- get the package root for the object
- ===============================================================================================
- -->
- <xts:block id="getRoutingInfo" mode="interpret" type="exec" processor="XSLT" mandatory="false" condition=".[not(/root/env/param[@name='promptResponse']) and not(/root/env/param[@name = 'doWait']) and /root/env/param[@name='model'] and /root/env/param[@name='model']!='' ]" nodelist="header, env">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <routingServerGroup>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:submit">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:requests>
- <cm:query>
- <cm:search>
- <xsl:value-of select="/root/env/param[@name='model']"/>
- </cm:search>
- <cm:properties>
- <cm:property name="parent"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </routingServerGroup>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- determine the routing server group
- ===============================================================================================
- -->
- <xts:block id="routingServerGroup" mode="interpret" path="/ags/determineRouting.xslt" type="exec" processor="XSLT" dependency="getRoutingInfo" condition=".[/root/routingServerGroup//*[local-name()='parent']//*[local-name()='searchPath']]" mandatory="false" nodelist="header, env, routingServerGroup"/>
-
- <!--
- ===============================================================================================
- execute-method - copes with
- ===============================================================================================
- -->
- <xts:block id="execute-method" processor="XSLT" type="exec" dependency="routingServerGroup" condition=".[/root/env/param[@name='method'] and /root/env/param[@name='method']!='']" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <promptRequest>
- <send:request provider="xts" option="xml-multipart">
- <xsl:choose>
- <xsl:when test="key('env-param', 'method') = 'edit' ">
- <prompt:collect>
- <returnMorphlet>ags/promptValuesProxy.xts</returnMorphlet>
- <ps_nav_op>maintain</ps_nav_op>
- <routingServerGroup><xsl:value-of select="/root/routingServerGroup/*[local-name()='result'][last()]"/></routingServerGroup>
- <runAsync>true</runAsync>
- </prompt:collect>
- </xsl:when>
- <xsl:otherwise>
- <xsl:element name="{key('env-param', 'method')}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
- <returnMorphlet>ags/promptValuesProxy.xts</returnMorphlet>
- <ps_nav_op>maintain</ps_nav_op>
- <routingServerGroup><xsl:value-of select="/root/routingServerGroup/*[local-name()='result'][last()]"/></routingServerGroup>
- </xsl:element>
- </xsl:otherwise>
- </xsl:choose>
- </send:request>
- </promptRequest>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- check-state -
- ===============================================================================================
- -->
- <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- </xts:block>
-
- <!--
- ================================================================================
- TWEAK M
- ================================================================================
- -->
- <xts:block id="tweakm" dependency="check-state" processor="XSLT" type="exec" condition=".[ not(/root/promptRequest/*[local-name()='part'])]" 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="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='m']"/>
- <xts:append select="/root/env">
- <param name="m">
- <xsl:text>/ags/dialogAdapter.xts</xsl:text>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- render_page
-
- Render the HTML really, just the dialog adapter page
- ===============================================================================================
- -->
- <xts:block id="render_page" dependency="tweakm" processor="XSLT" type="exec" mode="interpret" condition=".[ not(/root/promptRequest/*[local-name()='part'])]" mandatory="false">
- <xts:logicsheet path="ags/logicsheets/agentDefinition.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:agsad="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/agentDefinition/">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xts:request name="BUS" target="bus://xts2/ags/dialogAdapter.xts" option="content" outputHeader="true">
- <!-- env -->
- <xsl:copy-of select="/root/env"/>
- <!-- system -->
- <xsl:copy-of select="/root/system"/>
- <!-- http -->
- <xsl:copy-of select="/root/http"/>
- <!-- session -->
- <xsl:copy-of select="/root/session"/>
- <!-- header vars -->
- <xsl:copy-of select="/root/header"/>
- <!-- credential -->
- <xsl:copy-of select="/root/credential"/>
- <!-- cookies-->
- <xsl:copy-of select="/root/cookies"/>
- <!-- user vars -->
- <xsl:copy-of select="/root/user"/>
- <!-- The parameters returned -->
- <xsl:copy-of select="/root/promptRequest"/>
- <!-- The parameters table view -->
- <xsl:copy-of select="/root/view"/>
- </xts:request>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- debug
-
- ================================================================================
- -->
- <xts:block id="debug" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html" condition=".[/root/session/param[@name = 'debug'] = '1']" dependency="check-state">
- <!-- Get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|