report_confirm.xts 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  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, 2017
  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" includeConfig="true" requiredCapability="canUseCognosViewerRunWithOptions">
  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. <!--
  20. ===============================================================================================
  21. getRoutingServerContent - Get the routing server information from CM
  22. ===============================================================================================
  23. -->
  24. <xts:block id="getRoutingServerContent"
  25. dependency="formlogic_init"
  26. processor="XSLT" type="exec" mandatory="false"
  27. condition=".[/root/env/param[@name='m_obj'] and /root/env/param[@name='method'] and /root/env/param[@name='method']!='']" nodelist="env, header, credential">
  28. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  29. <xsl:stylesheet version="1.0"
  30. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  31. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  32. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  33. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  34. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  35. exclude-result-prefixes="xsl send xts cm">
  36. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  37. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  38. <xsl:template match="/">
  39. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  40. <xts:sequence>
  41. <xts:append>
  42. <routing>
  43. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  44. <send:request provider="cm">
  45. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  46. <cm:query>
  47. <cm:search><xsl:value-of select="key('env-param', 'm_obj')"/></cm:search>
  48. <cm:properties>
  49. <cm:property name="searchPath"/>
  50. <cm:property name="routingServerGroup"/>
  51. </cm:properties>
  52. </cm:query>
  53. </xts:transform>
  54. </send:request>
  55. </xts:transform>
  56. </routing>
  57. </xts:append>
  58. <xts:append select="/root/env">
  59. <param name="routingServerGroup"><xts:queryValue select="/root/routing/*[local-name()='queryResponse']/*/*[local-name()='routingServerGroup']"/></param>
  60. </xts:append>
  61. <xts:delete select="/root/routing"/>
  62. <xsl:if test="key('env-param','ca_deliveryOptions') != ''">
  63. <xts:append select="/root/env">
  64. <param name='deliveryOptions'>
  65. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string(key('env-param','ca_deliveryOptions')), true()))"/>
  66. </param>
  67. <param name='emailSummary'>
  68. <xts:string id="IDS_PROP_RECIPIENTS"/>
  69. </param>
  70. <param name='m_ro_saveOutput'>true</param>
  71. </xts:append>
  72. <xts:delete select="/root/env/param[@name='ca_deliveryOptions']"/>
  73. </xsl:if>
  74. </xts:sequence>
  75. </xsl:template>
  76. </xsl:stylesheet>
  77. </xts:block>
  78. <!--
  79. ===============================================================================================
  80. restore_state - have been called from powerPlayService so we have to restore the state and extract the new prompt parameters
  81. ===============================================================================================
  82. -->
  83. <xts:block id="restore_state" processor="XSLT" dependency="getRoutingServerContent" type="exec" condition=".[ /root/env/param[@name='opaque'] or /root/env/param[@name='ccstate']]" mandatory="false">
  84. <xts:logicsheet path="logicsheets/portal.xsl"/>
  85. <xsl:stylesheet version="1.0"
  86. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  87. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  88. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  89. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  90. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  91. exclude-result-prefixes="xsl pf xtsext xsi SOAP-ENC">
  92. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  93. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  94. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  95. <xsl:template match="/">
  96. <xts:sequence>
  97. <!-- get the parameters returned from powerPlayService and append to root -->
  98. <xsl:if test="key('env-param','m_parameter')!=''">
  99. <xts:append select="/root">
  100. <parameters>
  101. <xts:transform src="transforms/portal/parameters/post-WARP-process.xslt" processor="XSLT">
  102. <xts:transform name="XMLDecode">
  103. <xsl:value-of select="string(key('env-param','m_parameter'))"/>
  104. </xts:transform>
  105. </xts:transform>
  106. </parameters>
  107. <view>properties</view>
  108. </xts:append>
  109. </xsl:if>
  110. <!-- save the value of this environment variable while we restore the <env> node -->
  111. <xsl:variable name="saved_parameters" select="key('env-param','m_parameter')"/>
  112. <!-- restore the saved state -->
  113. <xts:replace select="/root/env">
  114. <env>
  115. <xts:transform name="XMLDecode">
  116. <xsl:choose>
  117. <!-- ccstate is returned from powerPlay when the user presses Cancel so unpack the state that is returned from ccstate -->
  118. <xsl:when test="/root/env/param[@name='ccstate']">
  119. <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','ccstate')))), true())"/>
  120. </xsl:when>
  121. <!-- opaque is returned from powerPlay when the user presses OK. -->
  122. <xsl:otherwise>
  123. <xsl:value-of select="xtsext:web64decode(string(xtsext:cafaction('sign_unwrap', string( key('env-param','opaque')))), true())"/>
  124. </xsl:otherwise>
  125. </xsl:choose>
  126. </xts:transform>
  127. </env>
  128. </xts:replace>
  129. <!-- restore the environment variable that was saved prior to restoring the <env> node -->
  130. <xts:append select="/root/env">
  131. <param name="m_parameter">
  132. <xsl:value-of select="$saved_parameters"/>
  133. </param>
  134. </xts:append>
  135. <xts:delete select="/root/env/param[@name='method']"/>
  136. </xts:sequence>
  137. </xsl:template>
  138. <pf:serialize-xml/>
  139. </xsl:stylesheet>
  140. </xts:block>
  141. <!--
  142. ===============================================================================================
  143. save_state - saves the current state to be passed to the powerPlayService
  144. ===============================================================================================
  145. -->
  146. <xts:block id="save_state" processor="XSLT" dependency="formlogic_init getRoutingServerContent restore_state" type="exec" condition=".[ /root/env/param[@name='method']='edit' and (/root/env/param[@name='m_class']='powerPlay8Report' or /root/env/param[@name='m_class']='powerPlay8ReportView')]" mandatory="false">
  147. <xts:logicsheet path="logicsheets/portal.xsl"/>
  148. <xsl:stylesheet version="1.0"
  149. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  150. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  151. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  152. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  153. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  154. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  155. <xsl:template match="/">
  156. <xts:sequence>
  157. <!-- remove any existing saved state-->
  158. <xts:delete select="/root/env/param[@name='savedEnv']"/>
  159. <!-- encode the current state and append to the environment in savedEnv -->
  160. <xts:append select="/root/env">
  161. <xsl:variable name="markup">
  162. <xsl:call-template name="serialize-xml">
  163. <xsl:with-param name="node-set" select="/root/env/param[@name != 'savedEnv']"/>
  164. </xsl:call-template>
  165. </xsl:variable>
  166. <param name="savedEnv">
  167. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup), true()))"/>
  168. </param>
  169. </xts:append>
  170. </xts:sequence>
  171. </xsl:template>
  172. <pf:serialize-xml/>
  173. </xsl:stylesheet>
  174. </xts:block>
  175. <!--
  176. ===============================================================================================
  177. callPowerPlayService - Calls the powerPlayService to deal with prompts by creating a blank redirect page and submitting
  178. ===============================================================================================
  179. -->
  180. <xts:block id="callPowerPlayService" dependency="save_state restore_state" mode="output" processor="XSLT" type="exec" condition=".[ /root/env/param[@name='method']='edit' and (/root/env/param[@name='m_class']='powerPlay8Report' or /root/env/param[@name='m_class']='powerPlay8ReportView')]" mandatory="false" mimeType="text/html">
  181. <!-- portal specific information -->
  182. <xts:logicsheet path="logicsheets/portal.xsl"/>
  183. <xsl:stylesheet version="1.0"
  184. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  185. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  186. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  187. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  188. exclude-result-prefixes="xsl xts pf xtsext">
  189. <pf:variables/>
  190. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  191. <xsl:template match="/">
  192. <!-- call powerPlayServce via POST to get the prompt information -->
  193. <html>
  194. <body>
  195. <form name="pform" method="post" action="{$gateway}">
  196. <input type="hidden" name="ui.backURL" value="{$gateway}?b_action=xts.run&amp;m={$app}/runWithOptions/report_confirm.xts&amp;ccstate={/root/env/param[@name='savedEnv']}"/>
  197. <input type="hidden" name="PP_BACK" value="{$gateway}?b_action=xts.run&amp;m={$app}/runWithOptions/report_confirm.xts&amp;ccstate={/root/env/param[@name='savedEnv']}"/>
  198. <input type="hidden" name="b_action" value="powerPlayService"/>
  199. <input type="hidden" name="ui.action" value="setPowerPlay8Prompt"/>
  200. <input type="hidden" name="m" value="{$app}/runWithOptions/report_confirm.xts"/>
  201. <input type="hidden" name="crnobj" value="{key('env-param','m_obj')}"/>
  202. <input type="hidden" name="ui.crnfrm" value="PDF"/>
  203. <input type="hidden" name="opaque" value="{key('env-param','savedEnv')}"/>
  204. <input type="hidden" name="store_ID" value="{key('env-param','m_storeID')}"/>
  205. </form>
  206. <!-- submit form -->
  207. <script type="text/javascript">
  208. document.pform.submit();
  209. <!--alert('This is from the powerplay block');-->
  210. </script>
  211. </body>
  212. </html>
  213. </xsl:template>
  214. </xsl:stylesheet>
  215. </xts:block>
  216. <!--
  217. ===============================================================================================
  218. execute-method -
  219. ===============================================================================================
  220. -->
  221. <xts:block id="execute-method" processor="XSLT" dependency="formlogic_init getRoutingServerContent restore_state" type="exec" condition=".[ /root/env/param[@name='method'] and /root/env/param[@name='method']!='' and not(/root/env/param[@name='m_class']='powerPlay8Report' or /root/env/param[@name='m_class']='powerPlay8ReportView')]" mandatory="false">
  222. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  223. <xsl:stylesheet version="1.0"
  224. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  225. xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
  226. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
  227. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  228. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  229. <xsl:template match="/">
  230. <xts:sequence>
  231. <xts:append>
  232. <promptRequest>
  233. <send:request provider="xts" option="xml-multipart">
  234. <xsl:choose>
  235. <xsl:when test="key('env-param', 'method') = 'edit'">
  236. <xsl:variable name="skipSummary" select="key('env-param', 'visited_schedule_properties') or key('env-param', 'showSummary')='n'"/>
  237. <prompt:collect>
  238. <redirect>
  239. <xsl:choose>
  240. <!-- don't come back to the summary page if we came from
  241. the schedule dialog or the user said he didn't want
  242. to see the summary page -->
  243. <xsl:when test="$skipSummary">portal/submit.xts</xsl:when>
  244. <xsl:otherwise>
  245. <xsl:value-of select="key('env-param', 'm')"/>
  246. </xsl:otherwise>
  247. </xsl:choose>
  248. </redirect>
  249. <returnMorphlet>portal/runWithOptions/report.xts</returnMorphlet>
  250. <runAsync>true</runAsync>
  251. <routingServerGroup><xsl:value-of select="/root/env/param[@name='routingServerGroup']"/></routingServerGroup>
  252. <showNoPromptsWarning>false</showNoPromptsWarning>
  253. </prompt:collect>
  254. </xsl:when>
  255. <xsl:otherwise>
  256. <xsl:element name="{key('env-param', 'method')}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
  257. <returnMorphlet>portal/runWithOptions/report.xts</returnMorphlet>
  258. <showNoPromptsWarning>false</showNoPromptsWarning>
  259. <callFinish>true</callFinish>
  260. </xsl:element>
  261. </xsl:otherwise>
  262. </xsl:choose>
  263. </send:request>
  264. </promptRequest>
  265. </xts:append>
  266. </xts:sequence>
  267. </xsl:template>
  268. </xsl:stylesheet>
  269. </xts:block>
  270. <!--
  271. ===============================================================================================
  272. check-state -
  273. ===============================================================================================
  274. -->
  275. <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method getRoutingServerContent restore_state">
  276. <xts:logicsheet path="logicsheets/portal.xsl"/>
  277. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  278. </xts:block>
  279. <!--
  280. ===============================================================================================
  281. getContent - Main content request
  282. ===============================================================================================
  283. -->
  284. <xts:block id="getContent" processor="XSLT" type="exec" dependency="check-state getRoutingServerContent" condition=".[/root/view='properties' and not(/root/env/param[@name='visited_schedule_properties']) and not(/root/env/param[@name='showSummary']='n') and not(/root/env/param[@name='m_class']='powerPlay8Report' or /root/env/param[@name='m_class']='powerPlay8ReportView')]" mandatory="false">
  285. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  286. <xts:logicsheet path="logicsheets/portal.xsl"/>
  287. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  288. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  289. <xsl:stylesheet version="1.0"
  290. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  291. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  292. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  293. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  294. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  295. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  296. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  297. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  298. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  299. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  300. <xsl:template match="/">
  301. <!-- remove the HTML and/or XLS2000 formats from the DOM if their respected checkboxes weren't checked -->
  302. <xsl:if test="key('env-param','m_ro_outputFormat_HTML')!='' and (not(key('env-param','m_ro_outputF_HTML_Type')) or key('env-param','m_ro_outputF_HTML_Type')='false')">
  303. <xts:sequence>
  304. <xts:delete select="/root/env/param[@name='m_ro_outputFormat_HTML']"/>
  305. </xts:sequence>
  306. </xsl:if>
  307. <xsl:if test="key('env-param','m_ro_outputFormat_XLS2000')!='' and (not(key('env-param','m_ro_outputF_XLS2000_Type')) or key('env-param','m_ro_outputF_XLS2000_Type')='false')">
  308. <xts:sequence>
  309. <xts:delete select="/root/env/param[@name='m_ro_outputFormat_XLS2000']"/>
  310. </xts:sequence>
  311. </xsl:if>
  312. <xts:sequence>
  313. <!-- encode the current state and append to the environment in savedEnv -->
  314. <xts:append select="/root/*[local-name()='env']">
  315. <xsl:variable name="markup">
  316. <xsl:call-template name="serialize-xml">
  317. <xsl:with-param name="node-set" select="/root/parameters"/>
  318. </xsl:call-template>
  319. </xsl:variable>
  320. <xsl:if test="$markup!=''">
  321. <xts:delete select="/root/env/param[@name='m_rp_parameters']"/>
  322. <param name="m_rp_parameters">
  323. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup), true()))"/>
  324. </param>
  325. </xsl:if>
  326. </xts:append>
  327. <xsl:if test="key('env-param','m_rp_parameters')">
  328. <dt:splitParameters/>
  329. </xsl:if>
  330. <xts:append>
  331. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  332. <send:request provider="cm">
  333. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  334. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  335. <cm:requests>
  336. <!-- Page definitions -->
  337. <cm:query>
  338. <cm:search>/configuration/pageDefinition</cm:search>
  339. <cm:properties>
  340. <cm:property name="displaySequence"/>
  341. <cm:property name="defaultName"/>
  342. <cm:property name="searchPath"/>
  343. </cm:properties>
  344. <cm:sortBy>
  345. <cm:sort name="displaySequence" order="descending"/>
  346. </cm:sortBy>
  347. </cm:query>
  348. <!-- Report/Query/ information -->
  349. <cm:query>
  350. <cm:search>
  351. <xsl:value-of select="key('env-param','m_obj')"/>
  352. </cm:search>
  353. <cm:properties>
  354. <cm:property name="searchPath"/>
  355. <cm:property name="defaultName"/>
  356. <cm:property name="ancestors"/>
  357. <cm:property name="objectClass"/>
  358. </cm:properties>
  359. </cm:query>
  360. <!-- need to get all the archiveLocations -->
  361. <cm:query>
  362. <cm:search>/configuration/archiveLocation</cm:search>
  363. <cm:properties>
  364. <cm:property name="searchPath"/>
  365. <cm:property name="defaultName"/>
  366. </cm:properties>
  367. <cm:sortBy>
  368. <cm:sort name="defaultName" order="ascending"/>
  369. </cm:sortBy>
  370. </cm:query>
  371. </cm:requests>
  372. </cm:query>
  373. </xts:transform>
  374. </send:request>
  375. </xts:transform>
  376. </xts:append>
  377. </xts:sequence>
  378. </xsl:template>
  379. <pf:serialize-xml/>
  380. </xsl:stylesheet>
  381. </xts:block>
  382. <!--
  383. ===============================================================================================
  384. queryDataSourcePrompts - Get the parameter data source connection/signon information from CM
  385. ===============================================================================================
  386. -->
  387. <xts:block id="queryDataSources"
  388. nodeList="credentialParameters,runnableParameters"
  389. path="/portal/iPrompting/logicsheets/query-datasource.xslt"
  390. processor="XSLT"
  391. type="exec"
  392. dependency="getContent"
  393. condition=".[/root/view='properties' and /root/credentialParameters and not(/root/env/param[@name='showSummary']='n')]"
  394. mandatory="false">
  395. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  396. </xts:block>
  397. <!--
  398. ===============================================================================================
  399. format - Generate the HTML output
  400. ===============================================================================================
  401. -->
  402. <xts:block id="format" mode="output" processor="XSLT" type="exec" dependency="queryDataSources check-state formlogic_init getContent restore_state" mimeType="text/html" condition=".[/root/view='properties' and (/root/env/param[@name='method']!='edit' or not(/root/env/param[@name='savedEnv']))]" mandatory="false">
  403. <!-- logicsheets -->
  404. <!-- portal specific information -->
  405. <xts:logicsheet path="logicsheets/portal.xsl"/>
  406. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  407. <xts:logicsheet path="portal/iPrompting/logicsheets/common.xslt"/>
  408. <!-- Generic logicsheets -->
  409. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  410. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  411. <!-- Dialog specific logicsheets -->
  412. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  413. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  414. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  415. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  416. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  417. <!-- apply the form logic -->
  418. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  419. <xts:logicsheet path="logicsheets/validation.xslt"/>
  420. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  421. <xsl:stylesheet version="1.0"
  422. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  423. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  424. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  425. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  426. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  427. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  428. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  429. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  430. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  431. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  432. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  433. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  434. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  435. xmlns:prt="http://developer.cognos.com/schemas/xts/iPrompting/logicsheets/common"
  436. exclude-result-prefixes="xts xsl cm pf xtsext lyt dp df cf cp prt">
  437. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  438. <!-- Global template variables -->
  439. <pf:variables/>
  440. <xsl:variable name="mname" select="'runWithOptions/report_confirm.xts'"/>
  441. <xsl:variable name="browserTitle"><xts:string id="IDS_COGNOS_REPORTS"/></xsl:variable>
  442. <!-- start the output -->
  443. <xsl:template match="/root">
  444. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  445. <dp:meta>
  446. <pf:meta/> <!-- Standard meta tags -->
  447. </dp:meta>
  448. <dp:script>
  449. <pf:help context="HID_RUN_REPORT"/> <!-- Help system -->
  450. <script language="javascript">
  451. var okCounter = 0;
  452. function onClickOK()
  453. {
  454. okCounter++;
  455. if (okCounter > 1)
  456. {
  457. if (okCounter > 2)
  458. {
  459. return false;
  460. }
  461. var msg = "<xts:string id="IDS_OTHERRUN_REQUEST_SUBMITTED" encode="javascript"><xts:param name="objName"><xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm_name')))"/></xts:param></xts:string>";
  462. alert(msg);
  463. return false;
  464. }
  465. return true;
  466. }
  467. function <xsl:text/>
  468. <xsl:choose>
  469. <xsl:when test="/root/env/param[@name='visited_schedule_properties'] or /root/env/param[@name='showSummary']='n'">init()</xsl:when>
  470. <xsl:otherwise>runReport()</xsl:otherwise>
  471. </xsl:choose>
  472. {
  473. var frm = document.pform;
  474. <!-- if the user doesn't have a credential saved in CM then get CAM to generate one -->
  475. if (!frm.m_sp_credential &amp;&amp; (frm.backgroundRun &amp;&amp; frm.backgroundRun.value == 'later'))
  476. {
  477. frm.h_CAM_action.value = 'generateTC';
  478. }
  479. <!-- when running in the background make sure that we don't prompt the user -->
  480. if (document.pform.m_ro_prompt)
  481. document.pform.m_ro_prompt.value = 'false';
  482. document.pform.ps_nav_op.value = 'submit';
  483. document.pform.m.value = 'portal/submit.xts';
  484. document.pform.submit();
  485. }
  486. </script>
  487. </dp:script>
  488. <utml:form name="pform" method="post" action="{$gateway}">
  489. <utml:read-only>false</utml:read-only>
  490. <input type="hidden" name="errURL">
  491. <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'backURL')"/></xsl:attribute>
  492. </input>
  493. <utml:input type="hidden" name="ifrmcmd" utml:update="false">
  494. <xsl:attribute name="value">
  495. <xsl:choose>
  496. <xsl:when test="not(key('env-param', 'visited_schedule_properties'))">execute</xsl:when>
  497. <xsl:otherwise>save</xsl:otherwise>
  498. </xsl:choose>
  499. </xsl:attribute>
  500. </utml:input>
  501. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  502. <utml:input name="h_CAM_action" type="hidden" utml:update="false"/>
  503. <!-- if we didn't come from the schedule dialog the show the confirmation page -->
  504. <xsl:if test="not(key('env-param', 'visited_schedule_properties')) and (key('env-param', 'showSummary')='y')">
  505. <!-- header -->
  506. <dp:header>
  507. <dp:title>
  508. <xsl:value-of select="$browserTitle"/>
  509. </dp:title>
  510. </dp:header>
  511. <!-- body -->
  512. <div id="maincontent" role="main" tabindex="-1" style="position:absolute; margin-left: -9999px; margin-top:-9999px" >
  513. <xsl:attribute name="aria-label"><xts:string id="IDS_SECTION508_CONTENT" encode="html"/></xsl:attribute>
  514. </div>
  515. <lyt:layout style="1">
  516. <lyt:section>
  517. <dp:box valign="top">
  518. <dp:boxSection hgap="20">
  519. <img width="32" height="32" align="top" hspace="10">
  520. <xsl:attribute name="src">
  521. <xsl:value-of select="concat($webcontent, '/', $app, '/images/msg_information.gif')"/>
  522. </xsl:attribute>
  523. <xsl:attribute name="aria-label"><xts:string id="IDS_ICON_INFORMATION"/></xsl:attribute>
  524. <xsl:attribute name="alt"><xts:string id="IDS_ICON_INFORMATION"/></xsl:attribute>
  525. </img>
  526. </dp:boxSection>
  527. <dp:boxSection>
  528. <dp:list>
  529. <dp:section1>
  530. <xts:string id="IDS_CONFIRMATION_TITLE">
  531. <xts:param name="objName"><xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_name'), $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></xts:param>
  532. </xts:string>
  533. </dp:section1>
  534. <dp:section2/>
  535. </dp:list>
  536. <dp:choice>
  537. <!-- time -->
  538. <dp:section3>
  539. <xsl:text><xts:string id="IDS_OTHERRUN_TIME"/></xsl:text>
  540. <xsl:value-of select="' '"/>
  541. <xsl:choose>
  542. <xsl:when test="not(key('env-param','backgroundRun')) or key('env-param','backgroundRun')='now'">
  543. <dp:text><xts:string id="IDS_CONFIRMATION_NOW"/></dp:text>
  544. </xsl:when>
  545. <xsl:otherwise>
  546. <xsl:variable name="date">
  547. <xsl:value-of select="concat(string(key('env-param', 'p_runDate')), 'T', substring-before(string(key('env-param', 'p_runTime')), '.'))"/>
  548. </xsl:variable>
  549. <!-- TODO: create and xtsext funtion to format the date -->
  550. <xsl:variable name="UTCDate">
  551. <xsl:value-of select="concat(substring(xtsext:formatDateToUTC( string( $date ), string( $timeZone ) ), 1, 16), ':00')"/>
  552. </xsl:variable>
  553. <xsl:variable name="formatDate">
  554. <xsl:value-of select="xtsext:formatDateFromUTC( string( $UTCDate ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  555. </xsl:variable>
  556. <xsl:value-of select="xtsext:enforceBTD($formatDate, 'auto', $productLocale, boolean($isBidiEnabled='true'))"/>
  557. </xsl:otherwise>
  558. </xsl:choose>
  559. </dp:section3>
  560. <!-- Formats -->
  561. <dp:section3>
  562. <xsl:text><xts:string id="IDS_OTHERRUN_FORMAT"/></xsl:text>
  563. <xsl:value-of select="' '"/>
  564. <xsl:variable name="PDFOptionSummary">
  565. <dt:buildPDFOptionSummary/>
  566. </xsl:variable>
  567. <dt:buildFormatSummary PDFSummary="$PDFOptionSummary"/>
  568. </dp:section3>
  569. <!-- A11y -->
  570. <xsl:if test="key('env-param', 'm_go_accessibilityFeatures') = 'true'">
  571. <dp:section3>
  572. <xsl:text><xts:string id="IDS_OTHERRUN_A11Y"/></xsl:text>
  573. <xsl:value-of select="' '"/>
  574. <xts:string id="IDS_PROP_RUN_A11Y_SUPPORT"/>
  575. </dp:section3>
  576. </xsl:if>
  577. <!-- Languages -->
  578. <dp:section3>
  579. <xsl:text><xts:string id="IDS_OTHERRUN_LANGUAGE"/></xsl:text>
  580. <xsl:value-of select="' '"/>
  581. <xsl:for-each select="/root/config/param[@name='locale']/locale[@type='contentLocale' and key('env-param','m_ro_outputLocale')=id]">
  582. <xsl:value-of select="displayName"/>
  583. <xsl:if test="position() != last()"><xts:string id="IDS_LIST_SEPARATOR"/><xsl:value-of select="' '"/></xsl:if>
  584. </xsl:for-each>
  585. </dp:section3>
  586. <xsl:variable name="parameters" select="./parameters"/>
  587. <xsl:variable name="credentials" select="./credentialParameters"/>
  588. <!-- Prompt information -->
  589. <xsl:if test="$parameters">
  590. <xsl:for-each select="$parameters/*[local-name()='parameterValue']">
  591. <dp:section3>
  592. <xsl:value-of select="*[local-name()='name']"/>
  593. <xsl:text><xts:string id="IDS_LIST_START"/></xsl:text>
  594. <xsl:apply-templates mode="render-values"/>
  595. </dp:section3>
  596. </xsl:for-each>
  597. </xsl:if>
  598. <xsl:if test="$credentials">
  599. <xsl:for-each select="$credentials/credential">
  600. <dp:section3>
  601. <xsl:call-template name="render-credential">
  602. <xsl:with-param name="credential" select="."/>
  603. <xsl:with-param name="pos" select="position()"/>
  604. </xsl:call-template>
  605. </dp:section3>
  606. </xsl:for-each>
  607. </xsl:if>
  608. <!-- save -->
  609. <xsl:if test="key('env-param','m_ro_saveOutput') !=''">
  610. <dp:section3>
  611. <xsl:choose>
  612. <xsl:when test="not(key('env-param','save_how')) or key('env-param','save_how')='report'">
  613. <xsl:text><xts:string id="IDS_OTHERRUN_SAVE_REPORT_CONFIRM"/></xsl:text>
  614. <xsl:value-of select="' '"/>
  615. <!-- Determine if the current path points to the personal folder space (We need a session element to make this determination) -->
  616. <xsl:variable name="path" select="/root/cm:queryResponse/cm:queryReply[2]/*/cm:searchPath"/>
  617. <!-- For personal folder destinations, render the path starting at the directory/namespace/account/folder ancestor. -->
  618. <xsl:variable name="rootPath">
  619. <xsl:choose>
  620. <xsl:when test="starts-with($path,'~') or starts-with($path,key('session-param', 'e_hp'))"><xsl:value-of select="'~/folder'"/></xsl:when>
  621. <xsl:otherwise><xsl:value-of select="$defaultContentRoot"/></xsl:otherwise>
  622. </xsl:choose>
  623. </xsl:variable>
  624. <cf:do-the-path-link>
  625. <cf:param name="familytree">cm:queryResponse/cm:queryReply[2]/*/cm:ancestors</cf:param>
  626. <cf:param name="familymember">cm:queryResponse/cm:queryReply[2]/*/cm:defaultName</cf:param>
  627. <cf:param name="home"><xsl:value-of select="$rootPath"/></cf:param>
  628. </cf:do-the-path-link>
  629. </xsl:when>
  630. <xsl:otherwise>
  631. <xsl:text><xts:string id="IDS_OTHERRUN_SAVE_NEW_ENTRY_CONFIRM"/></xsl:text>
  632. <xsl:value-of select="' '"/>
  633. <xsl:value-of select="key('env-param', 'saveAsPathText')"/>
  634. <xsl:choose>
  635. <xsl:when test="$isBidiEnabled = 'true'">
  636. <xsl:value-of select="' &#8206;&gt; '"/>
  637. <xsl:value-of select="xtsext:enforceBTD(key('env-param', 'm_ro_saveAsName'), $baseTextDirection, $productLocale)"/>
  638. </xsl:when>
  639. <xsl:otherwise>
  640. <xsl:value-of select="' &gt; '"/>
  641. <xsl:value-of select="key('env-param', 'm_ro_saveAsName')"/>
  642. </xsl:otherwise>
  643. </xsl:choose>
  644. </xsl:otherwise>
  645. </xsl:choose>
  646. </dp:section3>
  647. </xsl:if>
  648. <!-- save to file system -->
  649. <xsl:if test="key('env-param','m_ro_archive') != ''">
  650. <dp:section3>
  651. <xsl:text><xts:string id="IDS_OTHERRUN_SAVE_FILE_SYSTEM"/></xsl:text>
  652. <xsl:text> (</xsl:text>
  653. <dt:buildArchiveOptionSummary/>
  654. <xsl:text>)</xsl:text>
  655. </dp:section3>
  656. </xsl:if>
  657. <!-- print -->
  658. <xsl:if test="key('env-param','m_ro_print') = 'true'">
  659. <dp:section3>
  660. <xsl:text><xts:string id="IDS_CONFIRMATION_PRINT_REPORT"/></xsl:text>
  661. <xsl:value-of select="' '"/>
  662. <xsl:value-of select="key('env-param','m_ro_printerAddress')"/>
  663. </dp:section3>
  664. </xsl:if>
  665. <!-- email -->
  666. <xsl:if test="key('env-param','m_ro_email') != ''">
  667. <dp:section3>
  668. <xsl:value-of select="key('env-param','emailSummary')"/>
  669. <xsl:if test="not(key('env-param','m_ro_burst')) or key('env-param','m_ro_burst') != 'true'">
  670. <xts:string id="IDS_LIST_START"/><xsl:value-of select="xtsext:sttInjectUCCIntoStr(concat(' ',key('env-param','emailDescription')), 'email', boolean($isBidiEnabled='true'))"/>
  671. </xsl:if>
  672. </dp:section3>
  673. </xsl:if>
  674. <!-- mobile -->
  675. <xsl:if test="key('env-param','m_ro_mobile') != ''">
  676. <dp:section3>
  677. <xsl:choose>
  678. <xsl:when test="not(key('env-param','mobileDescription'))">
  679. <xts:string id="IDS_OTHERRUN_DELIVERY_MOBILE_REPORT"/><xts:string id="IDS_LIST_START"/><xsl:value-of select="concat(' ',key('env-param','emailDescription'))"/>
  680. </xsl:when>
  681. <xsl:otherwise>
  682. <xsl:value-of select="key('env-param','mobileSummary')"/>
  683. <xts:string id="IDS_LIST_START"/><xsl:value-of select="concat(' ',key('env-param','mobileDescription'))"/>
  684. </xsl:otherwise>
  685. </xsl:choose>
  686. </dp:section3>
  687. </xsl:if>
  688. <!-- Burst -->
  689. <xsl:if test="key('env-param','m_ro_burst') = 'true'">
  690. <dp:section3>
  691. <xts:string id="IDS_OTHERRUN_BURST"/>
  692. <ut:burstSummary />
  693. </dp:section3>
  694. </xsl:if>
  695. </dp:choice>
  696. <br/>
  697. <br/>
  698. <xsl:if test="not(key('env-param','backgroundRun')) or key('env-param','backgroundRun') = 'now'">
  699. <dp:choice>
  700. <dp:section1>
  701. <utml:input type="checkbox" name="viewHistoryCheckBox" id="ctrl_viewHistoryCheckBox"/>
  702. </dp:section1>
  703. <dp:section2 for="ctrl_viewHistoryCheckBox">
  704. <xts:string id="IDS_CONFIRMATION_VIEW_HISTORY_REPORT_CHECK_BOX"/>
  705. </dp:section2>
  706. </dp:choice>
  707. <br/>
  708. </xsl:if>
  709. <xts:string id="IDS_CONFIRMATION_QUESTION"/>
  710. </dp:boxSection>
  711. </dp:box>
  712. </lyt:section>
  713. </lyt:layout>
  714. <!-- show this dialog again? -->
  715. <!-- Don't show this option for Anonymous users -->
  716. <xsl:if test="$is-named = '1'">
  717. <lyt:layout style="1">
  718. <lyt:section>
  719. <dp:choice>
  720. <dp:section1>
  721. <utml:input type="checkbox" name="showSummaryPage" value="y" checked="true" utml:track="true" id="ctrl_showSummaryPage"/>
  722. </dp:section1>
  723. <dp:section2 for="ctrl_showSummaryPage">
  724. <xts:string id="IDS_CONFIRMATION_SHOW_AGAIN"/>
  725. </dp:section2>
  726. </dp:choice>
  727. </lyt:section>
  728. </lyt:layout>
  729. </xsl:if>
  730. <!-- footer -->
  731. <dp:footer>
  732. <df:button df:id="IDS_OK" df:style="href" df:href="javascript:runReport();" onclick="return onClickOK()"/>
  733. <xsl:choose>
  734. <xsl:when test="/root/env/param[@name='fromCA']">
  735. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  736. </xsl:when>
  737. <xsl:otherwise>
  738. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  739. </xsl:otherwise>
  740. </xsl:choose>
  741. </dp:footer>
  742. </xsl:if>
  743. </utml:form>
  744. </dp:page>
  745. </xsl:template>
  746. <prt:renderValuePrompts/>
  747. <prt:renderCredentialPrompts/>
  748. </xsl:stylesheet>
  749. </xts:block>
  750. <!--
  751. ===============================================================================================
  752. debug - display debug information
  753. ===============================================================================================
  754. -->
  755. <xts:block id="debug" dependency="format" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  756. <!-- get the debug logic sheet -->
  757. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  758. <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">
  759. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  760. <xsl:template match="/">
  761. <dbg:dumpxml select="/root"/>
  762. </xsl:template>
  763. </xsl:stylesheet>
  764. </xts:block>
  765. </xts:morphlet>