collect.xts 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <xts:block id="specialparams" mode="interpret" dependency="formlogic_init" condition=".[(/root/command/*/routingServerGroup and /root/command/*/routingServerGroup != '') or (/root/env/param[@name='encodedRptSvcParam'] and /root/env/param[@name='encodedRptSvcParam'] != '') or /root/command/*/callerAdminState or /root/command/*/addToPromptingEnv]" processor="XSLT" type="exec" nodelist="env,command" mandatory="false">
  20. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  21. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  22. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  23. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  24. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  25. exclude-result-prefixes="bus xtsext xts">
  26. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  27. <xsl:template match="/">
  28. <xts:sequence>
  29. <xsl:if test="/root/command/*/routingServerGroup">
  30. <xts:delete select="/root/env/param[@name='ui.routingServerGroup']"/>
  31. <xts:append select="/root/env"><param name="ui.routingServerGroup"><xsl:value-of select="/root/command/*/routingServerGroup"/></param></xts:append>
  32. </xsl:if>
  33. <xsl:if test="/root/command/*/callerAdminState">
  34. <xts:delete select="/root/env/param[@name='adminState' or @name='m_tracking' or @name='web64conversation' or @name='ui.conversation' or @name='encodedParameters']"/>
  35. </xsl:if>
  36. <xsl:if test="string(/root/env/param[@name='encodedRptSvcParam'])!=''">
  37. <xts:append select="/root">
  38. <xts:function name="web64decode">
  39. <xts:param name="source">
  40. <xts:transform name="XMLDecode">
  41. <xsl:value-of select="xtsext:cafaction('sign_unwrap',string(/root/env/param[@name='encodedRptSvcParam']))"/>
  42. </xts:transform>
  43. </xts:param>
  44. </xts:function>
  45. </xts:append>
  46. <xts:delete select="/root/env/param[@name='encodedRptSvcParam']"/>
  47. </xsl:if>
  48. <xsl:if test="/root/command/*/addToPromptingEnv">
  49. <xts:delete>
  50. <xsl:attribute name="select">
  51. <xsl:text/>/root/env/param[<xsl:text/>
  52. <xsl:for-each select="/root/command/*/addToPromptingEnv/*">
  53. <xsl:text/>@name='<xsl:value-of select="@name"/>' or <xsl:text/>
  54. </xsl:for-each>
  55. <xsl:text/>@name='method' or @name='cleared_prompts']<xsl:text/>
  56. </xsl:attribute>
  57. </xts:delete>
  58. <xts:append select="/root/env">
  59. <xsl:for-each select="/root/command/*/addToPromptingEnv/*">
  60. <param name='{@name}'><xsl:value-of select="."/></param>
  61. </xsl:for-each>
  62. </xts:append>
  63. </xsl:if>
  64. </xts:sequence>
  65. </xsl:template>
  66. </xsl:stylesheet>
  67. </xts:block>
  68. <!--
  69. ===============================================================================================
  70. request - We depend on the caller passing in the form fields from their request header. As a result there are no input parameters
  71. to the collect request.
  72. ===============================================================================================
  73. -->
  74. <xts:block id="request" mode="interpret" dependency="formlogic_init specialparams" processor="XSLT" type="exec">
  75. <xts:logicsheet path="logicsheets/portal.xsl"/>
  76. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  77. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  78. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  79. xmlns:rs="http://developer.cognos.com/schemas/reportService/1"
  80. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  81. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  82. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  83. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  84. xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
  85. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  86. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  87. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  88. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  89. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  90. exclude-result-prefixes="bus rs send xsi xsd xtsext pf SOAP-ENV SOAP-ENC xs prompt xts">
  91. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  92. <pf:variables/>
  93. <xsl:template match="/">
  94. <xts:sequence>
  95. <xts:append>
  96. <response>
  97. <send:request provider="warp" option="xml-multipart" outputHeader="true" responseEnvelope="true">
  98. <xsl:choose>
  99. <xsl:when test="/root/command/*/metaDataRequest and string(/root/command/*/metaDataRequest)!=''">
  100. <rs:runSpecification>
  101. <xsl:call-template name="objSpec"/>
  102. <xsl:call-template name="parmVals"/>
  103. <xsl:call-template name="opts"/>
  104. </rs:runSpecification>
  105. </xsl:when>
  106. <xsl:when test="/root/command/*/getParametersRequest and string(/root/command/*/getParametersRequest)!=''">
  107. <rs:getParameters>
  108. <xsl:call-template name="objPath"/>
  109. <xsl:call-template name="parmVals"/>
  110. <xsl:call-template name="opts"/>
  111. </rs:getParameters>
  112. </xsl:when>
  113. <xsl:when test="/root/command/*/reportSpec and string(/root/command/*/reportSpec)!=''">
  114. <rs:collectParameterValuesSpecification>
  115. <specification xsi:type="bus:reportServiceReportSpecification">
  116. <value xsi:type="bus:specification">
  117. <xsl:value-of select="string(/root/command/*/reportSpec)"/>
  118. </value>
  119. </specification>
  120. <xsl:call-template name="parmVals"/>
  121. <xsl:call-template name="opts"/>
  122. </rs:collectParameterValuesSpecification>
  123. </xsl:when>
  124. <xsl:when test="/root/command/*/getParametersSpecificationRequest and string(/root/command/*/getParametersSpecificationRequest)!=''">
  125. <rs:getParametersSpecification>
  126. <specification xsi:type="bus:reportServiceReportSpecification">
  127. <value xsi:type="bus:specification">
  128. <xsl:value-of select="string(/root/command/*/reportSpec)"/>
  129. </value>
  130. </specification>
  131. <xsl:call-template name="parmVals"/>
  132. <xsl:call-template name="opts"/>
  133. </rs:getParametersSpecification>
  134. </xsl:when>
  135. <xsl:otherwise>
  136. <rs:collectParameterValues>
  137. <xsl:call-template name="objPath"/>
  138. <xsl:call-template name="parmVals"/>
  139. <xsl:call-template name="opts"/>
  140. </rs:collectParameterValues>
  141. </xsl:otherwise>
  142. </xsl:choose>
  143. </send:request>
  144. </response>
  145. </xts:append>
  146. <!-- The callerAdminState is a encoded snapshot of the environment prior to calling this morphlet. -->
  147. <xts:append>
  148. <encodedAdminState>
  149. <xsl:choose>
  150. <xsl:when test="not(/root/command/*/callerAdminState)">
  151. <xts:function name="web64encode">
  152. <xts:param name="source">
  153. <xts:transform name="XMLEncode">
  154. <xsl:copy-of select="/root/env/param[@name != 'method' and @name != 'cleared_prompts' and @name != 'execMethod']"/>
  155. <param name="cleared_prompts">false</param>
  156. <xsl:if test="/root/command/*/addToPromptingEnv">
  157. <xsl:for-each select="/root/command/*/addToPromptingEnv/*">
  158. <param name="{@name}"><xsl:value-of select="."/></param>
  159. </xsl:for-each>
  160. </xsl:if>
  161. </xts:transform>
  162. </xts:param>
  163. <xts:param name="compress">true</xts:param>
  164. </xts:function>
  165. </xsl:when>
  166. <xsl:otherwise>
  167. <xsl:value-of select="/root/command/*/callerAdminState"/>
  168. </xsl:otherwise>
  169. </xsl:choose>
  170. </encodedAdminState>
  171. <encodedTracking>
  172. <xts:function name="web64encode">
  173. <xts:param name="source">
  174. <xts:transform name="XMLEncode">
  175. <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Header']/*[local-name()='biBusHeader']/*[local-name() = 'tracking']"/>
  176. </xts:transform>
  177. </xts:param>
  178. <xts:param name="compress">true</xts:param>
  179. </xts:function>
  180. </encodedTracking>
  181. <encodedUIConversation>
  182. <xts:function name="web64encode">
  183. <xts:param name="source">
  184. <xts:transform name="XMLEncode">
  185. <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*[contains(local-name(), 'Response')]/*[local-name()='result']/*[local-name()='primaryRequest']"/>
  186. </xts:transform>
  187. </xts:param>
  188. <xts:param name="compress">true</xts:param>
  189. </xts:function>
  190. </encodedUIConversation>
  191. <encodedConversation>
  192. <xts:function name="web64encode">
  193. <xts:param name="source">
  194. <xts:transform name="XMLEncode">
  195. <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*[contains(local-name(), 'Response')]/*[local-name()='result']/*[local-name()='primaryRequest']/*"/>
  196. </xts:transform>
  197. </xts:param>
  198. <xts:param name="compress">true</xts:param>
  199. </xts:function>
  200. </encodedConversation>
  201. <conversationStatus>
  202. <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*[contains(local-name(), 'Response')]/*[local-name()='result']/*[local-name()='details']/*[local-name()='item']/*[local-name()='status']"/>
  203. </conversationStatus>
  204. <resultStatus>
  205. <xts:queryNode select="/root/response/*[local-name()='Envelope']/*[local-name()='Body']/*[contains(local-name(), 'Response')]/*[local-name()='result']/*[local-name()='status']"/>
  206. </resultStatus>
  207. </xts:append>
  208. </xts:sequence>
  209. </xsl:template>
  210. <xsl:template name="objPath">
  211. <objectPath xsi:type="bus:searchPathSingleObject">
  212. <xsl:choose>
  213. <xsl:when test="/root/command/*/promptObject != ''">
  214. <xsl:value-of select="/root/command/*/promptObject"/>
  215. </xsl:when>
  216. <xsl:otherwise>
  217. <xsl:value-of select="key('env-param', 'm_obj')"/>
  218. </xsl:otherwise>
  219. </xsl:choose>
  220. </objectPath>
  221. </xsl:template>
  222. <xsl:template name="objSpec">
  223. <xsl:choose>
  224. <xsl:when test="string(/root/env/param[@name='execMethod'])='metadata' and (/root/env/param[@name='startScopeAt'] or /root/env/param[@name='startBMItemAt'] or /root/env/param[starts-with(@name,'startDataItemAt_')])">
  225. <bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  226. <bus:value xsi:type="bus:specification">&lt;metadataRequest connection=&quot;<xsl:value-of select="xtsext:xmlencode(string(/root/command/*/promptObject))"/>&quot;&gt;
  227. <xsl:text/>&lt;Metadata authoringLocale=&quot;<xsl:value-of select="/root/session/param[@name='contentLocale']"/>&quot; start_at=&quot;&quot; <xsl:if test="/root/env/param[@name='startScopeAt']">start_atRef=&quot;<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='startScopeAt']))"/>&quot; </xsl:if> Depth=&quot;2&quot;&gt;<xsl:text/>
  228. <xsl:text/>&lt;Start_at&gt;<xsl:text/>
  229. <xsl:if test="/root/env/param[@name='startBMItemAt']">
  230. <xsl:text/>&lt;Path name=&quot;<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='startBMItemAt']))"/>&quot;/&gt;<xsl:text/>
  231. </xsl:if>
  232. <xsl:for-each select="/root/env/param[starts-with(@name,'startDataItemAt_')]">
  233. <xsl:text/>&lt;Path name=&quot;<xsl:value-of select="xtsext:xmlencode(string(.))"/>&quot;/&gt;<xsl:text/>
  234. </xsl:for-each>
  235. <xsl:text/>&lt;/Start_at&gt;<xsl:text/>
  236. <xsl:text/>&lt;Properties&gt;<xsl:text/>
  237. <xsl:text/>&lt;Property name=&quot;*/@name&quot;/&gt;<xsl:text/>
  238. <xsl:text/>&lt;Property name=&quot;*/@_path&quot;/&gt;<xsl:text/>
  239. <xsl:text/>&lt;Property name=&quot;*/@_ref&quot;/&gt;<xsl:text/>
  240. <xsl:text/>&lt;Property name=&quot;*/@_ancestors&quot;/&gt;<xsl:text/>
  241. <xsl:text/>&lt;Property name=&quot;./folder&quot;/&gt;<xsl:text/>
  242. <xsl:text/>&lt;Property name=&quot;./measureFolder&quot;/&gt;<xsl:text/>
  243. <xsl:text/>&lt;Property name=&quot;./querySubject&quot;/&gt;<xsl:text/>
  244. <xsl:text/>&lt;Property name=&quot;./queryItem&quot;/&gt;<xsl:text/>
  245. <xsl:text/>&lt;Property name=&quot;./queryItemFolder&quot;/&gt;<xsl:text/>
  246. <xsl:text/>&lt;Property name=&quot;./filter&quot;/&gt;<xsl:text/>
  247. <xsl:text/>&lt;Property name=&quot;./calculation&quot;/&gt;<xsl:text/>
  248. <xsl:text/>&lt;Property name=&quot;./dimension&quot;/&gt;<xsl:text/>
  249. <xsl:text/>&lt;Property name=&quot;./hierarchy&quot;/&gt;<xsl:text/>
  250. <xsl:text/>&lt;Property name=&quot;./level&quot;/&gt;<xsl:text/>
  251. <xsl:text/>&lt;Property name=&quot;./measure&quot;/&gt;<xsl:text/>
  252. <xsl:text/>&lt;/Properties&gt;<xsl:text/>
  253. <xsl:text/>&lt;/Metadata&gt;&lt;/metadataRequest&gt;</bus:value></bus:specification>
  254. </xsl:when>
  255. <xsl:otherwise>
  256. <bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  257. <bus:value xsi:type="bus:specification">&lt;metadataRequest connection=&quot;<xsl:value-of select="xtsext:xmlencode(string(key('env-param','m_path')))"/>&quot;&gt;&lt;Metadata authoringLocale=&quot;<xsl:value-of select="/root/session/param[@name='contentLocale']"/>&quot; xml:lang=&quot;<xsl:value-of select="/root/session/param[@name='productLocale']"/>&quot; start_at=&quot;&quot; Depth=&quot;2&quot; no_collections=&quot;1&quot;&gt;&lt;Properties&gt;&lt;Property name=&quot;*/@_path&quot;/&gt;&lt;/Properties&gt;&lt;/Metadata&gt;&lt;/metadataRequest&gt;</bus:value>
  258. </bus:specification>
  259. </xsl:otherwise>
  260. </xsl:choose>
  261. </xsl:template>
  262. <xsl:template name="parmVals">
  263. <xsl:choose>
  264. <xsl:when test="/root/command/*/parameterValues != ''">
  265. <xts:queryNode select="/root/command/*/parameterValues/*[local-name()='parameterValues']"/>
  266. </xsl:when>
  267. <xsl:when test="/root/command/*/*[local-name()='parameters'] != ''">
  268. <xts:transform src="transforms/portal/parameters/pre-WARP-process.xslt" processor="XSLT">
  269. <xts:queryNode select="/root/command/*/*[local-name()='parameters']"/>
  270. </xts:transform>
  271. </xsl:when>
  272. <xsl:when test="/root/rptSvcParam">
  273. <bus:parameterValues xsi:type="bus:parameterValueArray" SOAP-ENC:arrayType="bus:parameterValue[]">
  274. <item>
  275. <bus:name xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam/@name"/></bus:name>
  276. <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">
  277. <item xsi:type="bus:simpleParmValueItem">
  278. <bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>
  279. <bus:display xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam"/></bus:display>
  280. <bus:use xsi:type="xsd:string"><xsl:value-of select="/root/rptSvcParam"/></bus:use>
  281. </item>
  282. </bus:value>
  283. </item>
  284. </bus:parameterValues>
  285. </xsl:when>
  286. <xsl:otherwise>
  287. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>
  288. </xsl:otherwise>
  289. </xsl:choose>
  290. </xsl:template>
  291. <xsl:template name="opts">
  292. <bus:options xsi:type="bus:optionArray" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  293. <item xsi:type="bus:runOptionBoolean">
  294. <bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>
  295. <bus:value xsi:type="xsd:boolean">
  296. <xsl:choose>
  297. <xsl:when test="/root/command/*/forcePrompting='false'">false</xsl:when>
  298. <xsl:otherwise>true</xsl:otherwise>
  299. </xsl:choose>
  300. </bus:value>
  301. </item>
  302. <item xsi:type="bus:runOptionString">
  303. <bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>
  304. <bus:value xsi:type="xsd:string">HTMLFragment</bus:value>
  305. </item>
  306. <item xsi:type="bus:runOptionOutputEncapsulation">
  307. <bus:name xsi:type="bus:runOptionEnum">outputEncapsulation</bus:name>
  308. <bus:value xsi:type="bus:outputEncapsulationEnum">none</bus:value>
  309. </item>
  310. <item xsi:type="bus:asynchOptionEncoding">
  311. <bus:name xsi:type="bus:asynchOptionEnum">attachmentEncoding</bus:name>
  312. <bus:value xsi:type="bus:encodingEnum">MIME</bus:value>
  313. </item>
  314. <item xsi:type="bus:runOptionAnyURI">
  315. <bus:name xsi:type="bus:runOptionEnum">xslURL</bus:name>
  316. <bus:value xsi:type="xsd:string">sa.xsl</bus:value>
  317. </item>
  318. <item xsi:type="bus:asynchOptionInt">
  319. <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
  320. <bus:value xsi:type="xsd:int">
  321. <xsl:choose>
  322. <xsl:when test="string(/root/command/*/runAsync)='true'">3</xsl:when>
  323. <xsl:otherwise>0</xsl:otherwise>
  324. </xsl:choose>
  325. </bus:value>
  326. </item>
  327. <item xsi:type="bus:asynchOptionBoolean">
  328. <bus:name xsi:type="bus:asynchOptionEnum">alwaysIncludePrimaryRequest</bus:name>
  329. <bus:value xsi:type="xsd:boolean">true</bus:value>
  330. </item>
  331. <item xsi:type="bus:runOptionLanguageArray">
  332. <bus:name xsi:type="bus:runOptionEnum">outputLocale</bus:name>
  333. <bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]">
  334. <xsl:choose>
  335. <!-- use locale from environment if only 1 exist -->
  336. <xsl:when test="count(key('env-param','m_ro_outputLocale'))=1">
  337. <item><xsl:value-of select="key('env-param','m_ro_outputLocale')"/></item>
  338. </xsl:when>
  339. <!-- otherwise use the content locale -->
  340. <xsl:otherwise>
  341. <item><xsl:value-of select="/root/session/param[@name='contentLocale']"/></item>
  342. </xsl:otherwise>
  343. </xsl:choose>
  344. </bus:value>
  345. </item>
  346. <item xsi:type="bus:genericOptionBoolean">
  347. <bus:name xsi:type="xsd:string">http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures</bus:name>
  348. <bus:value xsi:type="xsd:boolean">
  349. <xsl:choose>
  350. <xsl:when test="key('env-param','m_go_accessibilityFeatures')">
  351. <xsl:value-of select="key('env-param','m_go_accessibilityFeatures')"/>
  352. </xsl:when>
  353. <xsl:otherwise>false</xsl:otherwise>
  354. </xsl:choose>
  355. </bus:value>
  356. </item>
  357. </bus:options>
  358. </xsl:template>
  359. <!-- used to copy the bus header stuff - see "apply-templates" above. -->
  360. <xsl:template match="*">
  361. <xsl:copy>
  362. <xsl:copy-of select="@*"/>
  363. <xsl:apply-templates/>
  364. </xsl:copy>
  365. </xsl:template>
  366. <pf:serialize-xml/>
  367. </xsl:stylesheet>
  368. </xts:block>
  369. <!--
  370. ===============================================================================================
  371. release conversation -
  372. ===============================================================================================
  373. -->
  374. <xts:block id="release-conversation" dependency="request" type="exec" mode="interpret" processor="XSLT" condition=".[(string(/root/resultStatus)='conversationComplete' or string(/root/resultStatus)='complete') and not(/root/response/*/*/*/*/*[local-name() = 'details']/*/*[local-name()='status'] = 'prompting') and /root/env/param[@name='web64conversation']]" mandatory="false">
  375. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  376. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  377. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  378. xmlns:rs="http://developer.cognos.com/schemas/reportService/1"
  379. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  380. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  381. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  382. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  383. xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope"
  384. SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  385. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  386. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  387. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  388. <xsl:template match="/">
  389. <xts:sequence>
  390. <xts:append>
  391. <releaseConversation>
  392. <send:request provider="warp" option="xml-multipart" outputHeader="true" responseEnvelope="true" affinity=".absolute">
  393. <xsl:element name="release" namespace="http://developer.cognos.com/schemas/reportService/1">
  394. <conversation xsi:type="bus:asynchRequest">
  395. <xts:transform name="XMLDecode">
  396. <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string(key('env-param','web64conversation')))), true())"/>
  397. </xts:transform>
  398. </conversation>
  399. </xsl:element>
  400. </send:request>
  401. </releaseConversation>
  402. </xts:append>
  403. </xts:sequence>
  404. </xsl:template>
  405. </xsl:stylesheet>
  406. </xts:block>
  407. <!--
  408. ===============================================================================================
  409. render-no-prompts -
  410. ===============================================================================================
  411. -->
  412. <xts:block id="render-no-prompts" type="exec" mode="output" processor="XSLT" dependency="request release-conversation"
  413. mimeType="text/html" contentId="noPromptsMessage" partId="1"
  414. path="/portal/iPrompting/page-parts/noPrompts.xslt"
  415. condition=".[(string(/root/resultStatus)='conversationComplete' or string(/root/resultStatus)='complete') and not(/root/response/*/*/*/*/*[local-name() = 'details']/*/*[local-name()='status'] = 'prompting')]"
  416. mandatory="false">
  417. <xts:logicsheet path="logicsheets/portal.xsl"/>
  418. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  419. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  420. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  421. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  422. </xts:block>
  423. <!--
  424. ===============================================================================================
  425. waitPage - Renders the contents of the wait page.
  426. ===============================================================================================
  427. -->
  428. <xts:block id="waitPage" type="exec" mode="output" processor="XSLT" dependency="request release-conversation"
  429. mimeType="text/html" contentId="waitPage" partId="1"
  430. path="/portal/iPrompting/page-parts/wait.xslt"
  431. condition=".[/root/resultStatus='working']"
  432. mandatory="false">
  433. <xts:logicsheet path="logicsheets/portal.xsl"/>
  434. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  435. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  436. </xts:block>
  437. <!--
  438. ===============================================================================================
  439. head - This block generates the HTML <head> tag.
  440. ===============================================================================================
  441. -->
  442. <xts:block id="head" type="exec" mode="output" processor="XSLT" dependency="request release-conversation"
  443. mimeType="text/html" contentId="head" partId="1"
  444. path="/portal/iPrompting/page-parts/head.xslt">
  445. <xts:logicsheet path="logicsheets/portal.xsl"/>
  446. <xts:logicsheet path="portal/iPrompting/logicsheets/common.xslt"/>
  447. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  448. </xts:block>
  449. <!--
  450. ===============================================================================================
  451. bottomRow - This block generates the bottom row of the main table.
  452. ===============================================================================================
  453. -->
  454. <xts:block id="bottomRow" type="exec" mode="output" processor="XSLT" dependency="request release-conversation"
  455. mimeType="text/html" contentId="bottomRow" partId="1"
  456. path="/portal/iPrompting/page-parts/tail.xslt">
  457. <xts:logicsheet path="logicsheets/portal.xsl"/>
  458. </xts:block>
  459. <!--
  460. ===============================================================================================
  461. render-page - Main page rendering block. Combines the "content" blocks generated in the blocks
  462. above with the report itself which is returned in a multi-part message from report server.
  463. ===============================================================================================
  464. -->
  465. <xts:block id="render-page" type="exec" mode="interpret" processor="XSLT"
  466. dependency="head bottomRow waitPage render-no-prompts"
  467. path="/portal/iPrompting/page-parts/page.xslt">
  468. <xts:logicsheet path="logicsheets/portal.xsl"/>
  469. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  470. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  471. </xts:block>
  472. </xts:morphlet>