processNewTasks.xts 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  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, 2012
  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, 2015 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/portalRL.xml, messages/portal.xml">
  13. <!--
  14. -->
  15. <!-- ======================================================== -->
  16. <!-- Session Management -->
  17. <!-- ======================================================== -->
  18. <!-- Reads session-sensitive info from CM -->
  19. <xts:block processor="XSLT" type="exec" mandatory="false"
  20. id="refreshSession"
  21. path="portal/cc/read_session.xml"
  22. condition=".[
  23. (string(/root/cookies/cookie[@name = 'cc_session']) = '' and not(/root/setCookies/cookie[@name='cam_passport' and string(@maxAge) = '-1']))
  24. or /root/env/param[@name='m_reload']
  25. or /root/env/param[@name='m_root'] ]">
  26. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  27. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  28. </xts:block>
  29. <!-- Update the <session> element for this request. -->
  30. <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession" processor="XSLT" type="exec"
  31. condition=".[
  32. /root/newSession
  33. or /root/env/param[@name='ui']
  34. or /root/env/param[@name='d']
  35. or /root/env/param[starts-with(@name,'m_s_')]
  36. or /root/env/param[@name = 'resetSort'] ]"
  37. mandatory="false"/>
  38. <!-- Save changes to the state info in a cookie -->
  39. <xts:block mode="interpret" processor="XSLT" type="exec"
  40. id="setSession"
  41. path="portal/set_session.xml"
  42. dependency="buildSession"
  43. condition=".[/root/updateSession or /root/deleteCookies]"
  44. mandatory="false"/>
  45. <!-- Encode the callers environment to use when ok or cancel is pressed. Only so.parameters and m are not encoded. ================ -->
  46. <xts:block
  47. id="handleCallerEnv"
  48. processor="XSLT"
  49. type="exec"
  50. condition=".[not(/root/env/param[@name='so.handledCallerEnv'])]"
  51. path="portal/select/src/handleCallerEnv.xslt"
  52. dependency="setSession"
  53. mandatory="false">
  54. <xts:logicsheet path="logicsheets/portal.xsl"/>
  55. </xts:block>
  56. <!-- Convert paths to id's. ================ -->
  57. <xts:block
  58. id="preprocess"
  59. processor="XSLT"
  60. type="exec"
  61. condition=".[not(/root/env/param[@name='so.defaultRootId'])]"
  62. path="portal/select/src/preprocess.xslt"
  63. dependency="handleCallerEnv"
  64. mandatory="false">
  65. <xts:logicsheet path="logicsheets/portal.xsl"/>
  66. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  67. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  68. </xts:block>
  69. <!-- Decode an existing selectionSpec node to use on return trip either from a navigation operation or a page refresh. ================ -->
  70. <xts:block
  71. id="unpackSelectionSpec"
  72. processor="XSLT"
  73. type="exec"
  74. dependency="handleCallerEnv preprocess"
  75. condition=".[/root/env/param[@name='so.savedSelectionSpec']]"
  76. mandatory="false">
  77. <xts:logicsheet path="logicsheets/portal.xsl"/>
  78. <xsl:stylesheet version="1.0"
  79. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  80. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  81. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  82. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  83. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  84. <xsl:template match="/">
  85. <xts:sequence>
  86. <xts:append select="/root">
  87. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='so.savedSelectionSpec'])), true())" disable-output-escaping="yes"/>
  88. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='so.savedspecGuide'])), true())" disable-output-escaping="yes"/>
  89. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='so.savedCallerEnv'])), true())" disable-output-escaping="yes"/>
  90. </xts:append>
  91. <xts:delete select="/root/env/param[@name='so.savedSelectionSpec' or @name='so.savedspecGuide' or @name='so.savedCallerEnv']"/>
  92. </xts:sequence>
  93. </xsl:template>
  94. <pf:serialize-xml/>
  95. </xsl:stylesheet>
  96. </xts:block>
  97. <!-- <xts:block id="selectionSpecMessages" type="exec" mode="interpret" processor="XSLT" dependency="getRootNames getRootMap unpackSelectionSpec" condition=".[not(/root/selectionSpec/item[@name='selectionTitle']) or not(/root/selectionSpec/item[@name='selectionIntro'])]" path="portal/select/src/selectionSpecMessages.xslt" mandatory="false"/> -->
  98. <xts:block
  99. id="messages"
  100. type="exec"
  101. mode="interpret"
  102. processor="XSLT"
  103. dependency="unpackSelectionSpec"
  104. condition=".[(not(/root/selectionSpec/item[@name='selectionTitle']) or not(/root/selectionSpec/item[@name='selectionIntro']))]"
  105. path="portal/select/src/messages.xslt"
  106. mandatory="false">
  107. <xts:logicsheet path="logicsheets/portal.xsl"/>
  108. </xts:block>
  109. <!-- Build a selectionSpec node from scratch or update it on a return trip either from a navigation operation or a page refresh. ================ -->
  110. <xts:block
  111. id="buildSpec"
  112. processor="XSLT"
  113. type="exec"
  114. dependency="handleCallerEnv unpackSelectionSpec messages"
  115. mandatory="false">
  116. <!-- <xts:queryNode select="/root/http | /root/session | /root/env | /root/CMRootMap | /root/system | /root/message"/> -->
  117. <!-- <xts:queryNode select="/root/http | /root/session | /root/env | /root/CMRootMap | /root/system | /root/selectionSpec"/> -->
  118. <xsl:stylesheet version="1.0"
  119. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  120. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  121. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  122. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  123. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  124. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  125. exclude-result-prefixes="xsl xts xtsext pf bus cm">
  126. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  127. <xsl:template match="root">
  128. <xts:sequence>
  129. <xsl:choose>
  130. <xsl:when test="not(/root/selectionSpec)">
  131. <xts:append select="/root">
  132. <xts:transform processor="XSLT" src="portal/select/transforms/buildSpec.xslt" mimeType="text/xml">
  133. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  134. <xts:param name="logicsheet">logicsheets/presentation/main/framework.xsl</xts:param>
  135. <xts:param name="messageBase">messages/portal.xml</xts:param>
  136. <xts:param name="messageBase">messages/portalRL.xml</xts:param>
  137. <root>
  138. <xts:queryNode select="/root/http | /root/session | /root/env | /root/system | /root/selectionSpecMessages | /root/searchSpecMessages"/>
  139. <xts:request protocol="FILEREAD" cache="true" target="/portal/select/res/specGuide.xml"/>
  140. </root>
  141. </xts:transform>
  142. </xts:append>
  143. <xts:delete select="/root/selectionSpecMessages"/>
  144. <xts:delete select="/root/searchSpecMessages"/>
  145. </xsl:when>
  146. <xsl:otherwise>
  147. <xts:replace select="/root/selectionSpec">
  148. <xts:transform processor="XSLT" src="portal/select/transforms/buildSpec.xslt" mimeType="text/xml">
  149. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  150. <xts:param name="logicsheet">logicsheets/presentation/main/framework.xsl</xts:param>
  151. <xts:param name="messageBase">messages/portal.xml</xts:param>
  152. <xts:param name="messageBase">messages/portalRL.xml</xts:param>
  153. <root>
  154. <xts:queryNode select="/root/http | /root/session | /root/env | /root/system | /root/selectionSpec"/>
  155. </root>
  156. </xts:transform>
  157. </xts:replace>
  158. </xsl:otherwise>
  159. </xsl:choose>
  160. <xts:delete select="/root/CMRootMap"/>
  161. <xts:delete select="/root/env/param[starts-with(@name,'so.condition_')]"/>
  162. </xts:sequence>
  163. </xsl:template>
  164. </xsl:stylesheet>
  165. </xts:block>
  166. <!-- Retrieve the objects based on the selectionPath item in the selectionSpec. ================ -->
  167. <!-- dependency="getRootNames getRootMap buildSpec" -->
  168. <xts:block
  169. id="getContent"
  170. processor="XSLT"
  171. type="exec"
  172. condition=".[/root/selectionSpec/item[@name='navigationId']]"
  173. dependency="buildSpec setSearchExpression"
  174. path="portal/select/src/getContent.xslt"
  175. mandatory="false">
  176. <xts:logicsheet path="portal/mru/logicsheets/mru.xslt"/>
  177. <xts:logicsheet path="logicsheets/portal.xsl"/>
  178. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  179. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  180. </xts:block>
  181. <xts:block
  182. id="setPackageEnv"
  183. processor="XSLT"
  184. type="exec"
  185. dependency="getContent"
  186. condition=".[not(/root/env/param[@name='so.defaultRootId']='')]"
  187. mandatory="false">
  188. <xts:logicsheet path="logicsheets/portal.xsl"/>
  189. <xsl:stylesheet version="1.0"
  190. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  191. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  192. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf xtsext">
  193. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  194. <xsl:template match="/">
  195. <xts:sequence>
  196. <!-- Once navigation is within a package, the defaultObject is set to that package - so use it for creating the new metrics task(s) -->
  197. <xsl:if test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='searchPath']=string(/root/env/param[@name='so.defaultObject']) and (not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='userInterfaces']) or /root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='userInterfaces']/*='metricStudio')">
  198. <xts:append select="/root">
  199. <oneMetricsPackage>
  200. <xsl:copy-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*"/>
  201. </oneMetricsPackage>
  202. </xts:append>
  203. </xsl:if>
  204. </xts:sequence>
  205. </xsl:template>
  206. <pf:serialize-xml/>
  207. </xsl:stylesheet>
  208. </xts:block>
  209. <xts:block id="redirect"
  210. processor="XSLT"
  211. type="exec"
  212. mode="output"
  213. mimeType="text/html"
  214. dependency="setPackageEnv"
  215. mandatory="false"
  216. condition=".[/root/env/param[@name='so.defaultRootId'] and /root/oneMetricsPackage]">
  217. <xts:logicsheet path="logicsheets/portal.xsl"/>
  218. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  219. <xsl:stylesheet version="1.0"
  220. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  221. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  222. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  223. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  224. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  225. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  226. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  227. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  228. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  229. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  230. exclude-result-prefixes="xsl pf dp utml xtsext cp bus cm cml xts">
  231. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  232. <pf:variables/>
  233. <xsl:template match="/">
  234. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$product_name">
  235. <dp:meta>
  236. <pf:meta/>
  237. </dp:meta>
  238. <form name="pform" method="post" action="{$gateway}">
  239. <input name="m" type="hidden" value="{/root/env/param[@name='so.return.m']}"/>
  240. <input name="m_path" type="hidden">
  241. <xsl:attribute name="value">
  242. <xsl:text/>storeID(&quot;<xsl:text/>
  243. <xsl:choose>
  244. <xsl:when test="string(key('env-param','so.defaultLocationId'))!=''"><xsl:value-of select="key('env-param','so.defaultLocationId')"/></xsl:when>
  245. <xsl:otherwise><xsl:value-of select="/root/oneMetricsPackage/*[local-name()='storeID']"/></xsl:otherwise>
  246. </xsl:choose>
  247. <xsl:text/>&quot;)<xsl:text/>
  248. </xsl:attribute>
  249. </input>
  250. <xsl:for-each select="/root/env/param[@name != 'm' and not(starts-with(@name,'so.')) and @name != 'm_path']">
  251. <input name="{@name}" type="hidden" value="{.}"/>
  252. </xsl:for-each>
  253. <xsl:for-each select="/root/callerEnv/param[@name != 'm' and not(starts-with(@name,'so.')) and @name != 'm_path' and @name!='m_path']">
  254. <input name="{@name}" type="hidden" value="{.}"/>
  255. </xsl:for-each>
  256. <xsl:for-each select="/root/selectionSpec/item[@name='returns']/*">
  257. <xsl:variable name="cmName" select="substring-after(@name,'so.')"/>
  258. <xsl:variable name="returnName">
  259. <xsl:choose>
  260. <xsl:when test="not(@alias)"><xsl:value-of select="@name"/></xsl:when>
  261. <xsl:otherwise><xsl:value-of select="@alias"/></xsl:otherwise>
  262. </xsl:choose>
  263. </xsl:variable>
  264. <input name="{$returnName}" type="hidden">
  265. <xsl:choose>
  266. <xsl:when test="substring-after(@name,'.')!='storeID'">
  267. <xsl:attribute name="value"><xsl:value-of select="/root/oneMetricsPackage/*[local-name()=string($cmName)]"/></xsl:attribute>
  268. </xsl:when>
  269. <xsl:otherwise>
  270. <xsl:attribute name="value"><xsl:text/>storeID(&quot;<xsl:text/><xsl:value-of select="/root/oneMetricsPackage/*[local-name()=string($cmName)]"/><xsl:text/>&quot;)<xsl:text/></xsl:attribute>
  271. </xsl:otherwise>
  272. </xsl:choose>
  273. </input>
  274. </xsl:for-each>
  275. </form>
  276. <script language="javascript">document.pform.submit();</script>
  277. </dp:page>
  278. </xsl:template>
  279. </xsl:stylesheet>
  280. </xts:block>
  281. <!-- Encode the selectionSpec node to use on a return trip either from a navigation operation or a page refresh. ================ -->
  282. <!-- dependency="getPackageProps redirect buildSpec" -->
  283. <xts:block
  284. id="packSelectionSpec"
  285. processor="XSLT"
  286. type="exec"
  287. dependency="buildSpec getContent setPackageEnv redirect"
  288. condition=".[/root/selectionSpec/item[@name='navigationId'] and not(/root/oneMetricsPackage)]"
  289. mandatory="false">
  290. <xts:logicsheet path="logicsheets/portal.xsl"/>
  291. <xsl:stylesheet version="1.0"
  292. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  293. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  294. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  295. exclude-result-prefixes="xtsext xts xsl pf">
  296. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  297. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  298. <xsl:template match="/">
  299. <xts:sequence>
  300. <xts:append select="/root/env">
  301. <xsl:variable name="spec">
  302. <xsl:call-template name="serialize-xml">
  303. <xsl:with-param name="node-set" select="/root/selectionSpec"/>
  304. </xsl:call-template>
  305. </xsl:variable>
  306. <param name="so.savedSelectionSpec">
  307. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($spec), true()))"/>
  308. </param>
  309. </xts:append>
  310. <xts:append select="/root/env">
  311. <xsl:variable name="guide">
  312. <xsl:call-template name="serialize-xml">
  313. <xsl:with-param name="node-set" select="/root/specGuide"/>
  314. </xsl:call-template>
  315. </xsl:variable>
  316. <param name="so.savedspecGuide">
  317. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($guide), true()))"/>
  318. </param>
  319. </xts:append>
  320. <xts:append select="/root/env">
  321. <xsl:variable name="callerEnv">
  322. <xsl:call-template name="serialize-xml">
  323. <xsl:with-param name="node-set" select="/root/callerEnv"/>
  324. </xsl:call-template>
  325. </xsl:variable>
  326. <param name="so.savedCallerEnv">
  327. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($callerEnv), true()))"/>
  328. </param>
  329. </xts:append>
  330. <xts:delete select="/root/specGuide"/>
  331. </xts:sequence>
  332. </xsl:template>
  333. <pf:serialize-xml/>
  334. </xsl:stylesheet>
  335. </xts:block>
  336. <!-- generate search expression (cm or nav) for search mode-->
  337. <xts:block
  338. id="setSearchExpression"
  339. processor="XSLT"
  340. condition=".[ /root/env/param[@name = 'sosmode'] = 'search' ]"
  341. type="exec"
  342. dependency="buildSpec"
  343. mandatory="false">
  344. <xts:logicsheet path="logicsheets/portal.xsl"/>
  345. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  346. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  347. <xts:logicsheet path="logicsheets/searchlogic.xslt"/>
  348. <xsl:stylesheet version="1.0"
  349. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  350. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  351. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  352. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  353. xmlns:search="http://developer.cognos.com/schemas/xts/logicsheets/xslt/searchlogic/">
  354. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  355. <pf:variables/>
  356. <xsl:key name="spec-item" match="/root/selectionSpec/item" use="@name"/>
  357. <xsl:template match="/root">
  358. <xsl:variable name="path">
  359. <xsl:text/>storeID("<xsl:value-of select="key('spec-item','navigationId')"/>")<xsl:text/>
  360. </xsl:variable>
  361. <xsl:variable name="ns-path" select="/root/env/param[@name='so.namespace']"/>
  362. <xts:sequence>
  363. <xsl:choose>
  364. <xsl:when test="string(/root/env/param[@name = 'sfield']) = 'k'">
  365. <search:gen-search-exp navInterface="true" mode="sos"/>
  366. </xsl:when>
  367. <xsl:otherwise>
  368. <search:gen-search-exp mode="sos"/>
  369. </xsl:otherwise>
  370. </xsl:choose>
  371. </xts:sequence>
  372. </xsl:template>
  373. </xsl:stylesheet>
  374. </xts:block>
  375. <!--Alter the ancestors path when the defaultContent is not the default consumer root '/content' - corresponds ps system.xml tag consumer-root. ================ -->
  376. <!-- dependency="getRootNames getRootMap buildSpec getContent" -->
  377. <xts:block
  378. id="getContent2"
  379. processor="XSLT"
  380. type="exec"
  381. dependency="buildSpec getContent redirect"
  382. condition=".[/root/selectionSpec/item[@name='navigationId'] and /root/session/param[@name='e_root'] and /root/session/param[@name='e_root'] != '' and /root/session/param[@name='e_root'] != '/content' and starts-with(/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='searchPath'],'/content')]"
  383. mandatory="false">
  384. <xts:logicsheet path="logicsheets/portal.xsl"/>
  385. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  386. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  387. <xsl:stylesheet version="1.0"
  388. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  389. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  390. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  391. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  392. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  393. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  394. exclude-result-prefixes="xsl send bus xts xtsext pf">>
  395. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  396. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  397. <xsl:key name="session-param" match="/root/session/param" use="@name"/>
  398. <xsl:key name="system-param" match="/root/system/param" use="@name"/>
  399. <pf:variables/>
  400. <xsl:template match="root">
  401. <xts:sequence>
  402. <xts:replace select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='ancestors']">
  403. <ancestors xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  404. <xsl:for-each select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]/*/*[local-name()='ancestors']/*[local-name()='ancestorInfo']">
  405. <xsl:if test="position()='1' or contains(string(./*[local-name()='searchPath']),string(key('session-param', 'e_root')))">
  406. <xsl:copy-of select="."/>
  407. </xsl:if>
  408. </xsl:for-each>
  409. </ancestors>
  410. </xts:replace>
  411. </xts:sequence>
  412. </xsl:template>
  413. </xsl:stylesheet>
  414. </xts:block>
  415. <!-- Retrieve the objects based on the selectionPath item in the selectionSpec. ================ -->
  416. <!-- dependency="getRootNames getRootMap buildSpec getContent getContent2"> -->
  417. <xts:block
  418. id="contentLogic"
  419. processor="XSLT"
  420. condition=".[/root/selectionSpec/item[@name='navigationId'] and not(/root/oneMetricsPackage)]"
  421. type="exec"
  422. dependency="buildSpec getContent getContent2 redirect"
  423. mandatory="false">
  424. <xsl:stylesheet version="1.0"
  425. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  426. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  427. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  428. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  429. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  430. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  431. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  432. exclude-result-prefixes="xsl xtsext pf bus cm pm xts">
  433. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  434. <xsl:template match="root">
  435. <xts:sequence>
  436. <xts:replace select="/root/*[local-name()='queryResponse']">
  437. <xts:transform processor="XSLT" src="portal/select/transforms/contentLogic.xslt" mimeType="text/xml">
  438. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  439. <xts:param name="logicsheet">logicsheets/permissions.xsl</xts:param>
  440. <xts:param name="logicsheet">logicsheets/cm-logic.xsl</xts:param>
  441. <xts:param name="logicsheet">logicsheets/buslogic.xslt</xts:param>
  442. <xts:param name="logicsheet">portal/mru/logicsheets/mru.xslt</xts:param>
  443. <xts:param name="messageBase">messages/portal.xml</xts:param>
  444. <xts:param name="messageBase">messages/portalRL.xml</xts:param>
  445. <root>
  446. <xts:queryNode select="/root/http | /root/session | /root/env | /root/system | /root/selectionSpec | root/*[local-name()='queryResponse'] "/>
  447. </root>
  448. </xts:transform>
  449. </xts:replace>
  450. </xts:sequence>
  451. </xsl:template>
  452. </xsl:stylesheet>
  453. </xts:block>
  454. <!--Render the Select Object page. ================ -->
  455. <!-- dependency="getRootMap getRootNames getContent getContent2 contentLogic unpackSelectionSpec packSelectionSpec handleCallerEnv buildSpec" -->
  456. <xts:block
  457. id="renderSODialogue"
  458. dependency="getContent getContent2 contentLogic unpackSelectionSpec packSelectionSpec handleCallerEnv buildSpec redirect"
  459. condition=".[/root/selectionSpec/item[@name='navigationId'] and not(/root/oneMetricsPackage)]"
  460. mode="output"
  461. processor="XSLT"
  462. type="exec"
  463. mimeType="text/html"
  464. path="portal/select/src/render.xslt"
  465. mandatory="false">
  466. <xts:logicsheet path="logicsheets/portal.xsl"/>
  467. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  468. <xts:logicsheet path="portal/select/logicsheets/search.xsl"/>
  469. <xts:logicsheet path="portal/select/logicsheets/pagers.xsl"/>
  470. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  471. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  472. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  473. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  474. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  475. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  476. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  477. <xts:logicsheet path="logicsheets/validation.xslt"/>
  478. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  479. </xts:block>
  480. <xts:block
  481. id="renderSOError"
  482. dependency="getContent getContent2 contentLogic unpackSelectionSpec packSelectionSpec handleCallerEnv buildSpec renderSODialogue redirect"
  483. condition=".[not(/root/selectionSpec/item[@name='navigationId']) and not(/root/oneMetricsPackage)]"
  484. mode="output"
  485. processor="XSLT"
  486. type="exec"
  487. mimeType="text/html"
  488. path="portal/select/src/error.xslt"
  489. mandatory="false">
  490. <xts:logicsheet path="logicsheets/portal.xsl"/>
  491. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  492. <xts:logicsheet path="portal/select/logicsheets/search.xsl"/>
  493. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  494. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  495. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  496. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  497. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  498. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  499. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  500. <xts:logicsheet path="logicsheets/validation.xslt"/>
  501. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  502. </xts:block>
  503. <!--
  504. ===============================================================================================
  505. debug - display debug information
  506. ===============================================================================================
  507. -->
  508. <!-- <xts:block id="debug" dependency="getRootMap getRootNames getContent getContent2 unpackSelectionSpec packSelectionSpec handleCallerEnv renderSODialogue" condition=".[ /root/session/param[@name='debug'] = '1' ]" type="exec" mode="output" processor="XSLT" mimeType="text/html">-->
  509. <xts:block id="debug" dependency="getContent getContent2 unpackSelectionSpec packSelectionSpec handleCallerEnv renderSODialogue renderSOError setPackageEnv redirect" condition=".[ /root/session/param[@name='debug'] = '1' ]" type="exec" mode="output" processor="XSLT" mimeType="text/html">
  510. <!-- get the debug logic sheet -->
  511. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  512. <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">
  513. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  514. <xsl:template match="/">
  515. <dbg:dumpxml select="/root"/>
  516. </xsl:template>
  517. </xsl:stylesheet>
  518. </xts:block>
  519. </xts:morphlet>