promptValuesProxy.xts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml,messages/AGS.xml,messages/portalRL.xml" requiredCapability="canUseEventStudio">
  9. <!--
  10. ===============================================================================================
  11. get the package root for the object
  12. ===============================================================================================
  13. -->
  14. <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">
  15. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  16. <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/">
  17. <xsl:template match="/">
  18. <xts:sequence>
  19. <xts:append select="/root">
  20. <routingServerGroup>
  21. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  22. <send:request provider="cm" requester="AGS:submit">
  23. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  24. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  25. <cm:requests>
  26. <cm:query>
  27. <cm:search>
  28. <xsl:value-of select="/root/env/param[@name='model']"/>
  29. </cm:search>
  30. <cm:properties>
  31. <cm:property name="parent"/>
  32. </cm:properties>
  33. </cm:query>
  34. </cm:requests>
  35. </cm:query>
  36. </xts:transform>
  37. </send:request>
  38. </xts:transform>
  39. </routingServerGroup>
  40. </xts:append>
  41. </xts:sequence>
  42. </xsl:template>
  43. </xsl:stylesheet>
  44. </xts:block>
  45. <!--
  46. ===============================================================================================
  47. determine the routing server group
  48. ===============================================================================================
  49. -->
  50. <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"/>
  51. <!--
  52. ===============================================================================================
  53. execute-method - copes with
  54. ===============================================================================================
  55. -->
  56. <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">
  57. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  58. <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/">
  59. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  60. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  61. <xsl:template match="/">
  62. <xts:sequence>
  63. <xts:append>
  64. <promptRequest>
  65. <send:request provider="xts" option="xml-multipart">
  66. <xsl:choose>
  67. <xsl:when test="key('env-param', 'method') = 'edit' ">
  68. <prompt:collect>
  69. <returnMorphlet>ags/promptValuesProxy.xts</returnMorphlet>
  70. <ps_nav_op>maintain</ps_nav_op>
  71. <routingServerGroup><xsl:value-of select="/root/routingServerGroup/*[local-name()='result'][last()]"/></routingServerGroup>
  72. <runAsync>true</runAsync>
  73. </prompt:collect>
  74. </xsl:when>
  75. <xsl:otherwise>
  76. <xsl:element name="{key('env-param', 'method')}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
  77. <returnMorphlet>ags/promptValuesProxy.xts</returnMorphlet>
  78. <ps_nav_op>maintain</ps_nav_op>
  79. <routingServerGroup><xsl:value-of select="/root/routingServerGroup/*[local-name()='result'][last()]"/></routingServerGroup>
  80. </xsl:element>
  81. </xsl:otherwise>
  82. </xsl:choose>
  83. </send:request>
  84. </promptRequest>
  85. </xts:append>
  86. </xts:sequence>
  87. </xsl:template>
  88. </xsl:stylesheet>
  89. </xts:block>
  90. <!--
  91. ===============================================================================================
  92. check-state -
  93. ===============================================================================================
  94. -->
  95. <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method">
  96. <xts:logicsheet path="logicsheets/portal.xsl"/>
  97. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  98. </xts:block>
  99. <!--
  100. ================================================================================
  101. TWEAK M
  102. ================================================================================
  103. -->
  104. <xts:block id="tweakm" dependency="check-state" processor="XSLT" type="exec" condition=".[ not(/root/promptRequest/*[local-name()='part'])]" mandatory="false">
  105. <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">
  106. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  107. <xsl:template match="/">
  108. <xts:sequence>
  109. <xts:delete select="/root/env/param[@name='m']"/>
  110. <xts:append select="/root/env">
  111. <param name="m">
  112. <xsl:text>/ags/dialogAdapter.xts</xsl:text>
  113. </param>
  114. </xts:append>
  115. </xts:sequence>
  116. </xsl:template>
  117. </xsl:stylesheet>
  118. </xts:block>
  119. <!--
  120. ================================================================================
  121. render_page
  122. Render the HTML really, just the dialog adapter page
  123. ===============================================================================================
  124. -->
  125. <xts:block id="render_page" dependency="tweakm" processor="XSLT" type="exec" mode="interpret" condition=".[ not(/root/promptRequest/*[local-name()='part'])]" mandatory="false">
  126. <xts:logicsheet path="ags/logicsheets/agentDefinition.xsl"/>
  127. <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/">
  128. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  129. <xsl:template match="/">
  130. <xts:sequence>
  131. <xts:append select="/root/output">
  132. <xos:part>
  133. <xos:entityHeader>
  134. <xos:param name="Content-Type">text/html; charset=utf-8</xos:param>
  135. </xos:entityHeader>
  136. <xos:entityBody>
  137. <xts:request name="BUS" target="bus://xts2/ags/dialogAdapter.xts" option="content" outputHeader="true">
  138. <!-- env -->
  139. <xsl:copy-of select="/root/env"/>
  140. <!-- system -->
  141. <xsl:copy-of select="/root/system"/>
  142. <!-- http -->
  143. <xsl:copy-of select="/root/http"/>
  144. <!-- session -->
  145. <xsl:copy-of select="/root/session"/>
  146. <!-- header vars -->
  147. <xsl:copy-of select="/root/header"/>
  148. <!-- credential -->
  149. <xsl:copy-of select="/root/credential"/>
  150. <!-- cookies-->
  151. <xsl:copy-of select="/root/cookies"/>
  152. <!-- user vars -->
  153. <xsl:copy-of select="/root/user"/>
  154. <!-- The parameters returned -->
  155. <xsl:copy-of select="/root/promptRequest"/>
  156. <!-- The parameters table view -->
  157. <xsl:copy-of select="/root/view"/>
  158. </xts:request>
  159. </xos:entityBody>
  160. </xos:part>
  161. </xts:append>
  162. </xts:sequence>
  163. </xsl:template>
  164. </xsl:stylesheet>
  165. </xts:block>
  166. <!--
  167. ================================================================================
  168. debug
  169. ================================================================================
  170. -->
  171. <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">
  172. <!-- Get the debug logic sheet -->
  173. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  174. <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">
  175. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  176. <xsl:template match="/">
  177. <dbg:dumpxml select="/root"/>
  178. </xsl:template>
  179. </xsl:stylesheet>
  180. </xts:block>
  181. </xts:morphlet>