get_content.xslt 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  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. <xsl:stylesheet version="1.0"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  15. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  16. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  17. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  18. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  19. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  20. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  21. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  23. xmlns:up="http://develop.cognos.com/schemas/upfront/"
  24. xmlns:mvc="http://developer.cognos.com/schemas/xts/mvc"
  25. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  26. xmlns:cps="http://developer.cognos.com/schemas/cps/asm/objects/1/"
  27. exclude-result-prefixes="SOAP-ENC xtsext xsd xsi bus xts send up cm pf cps">
  28. <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
  29. <!-- xsl keys -->
  30. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  31. <xsl:key name="session-param" match="/root/session/param" use="@name"/>
  32. <!-- Some general session info -->
  33. <xsl:variable name="isAdminUser" select="boolean(key('session-param','capabilities')/canUseAdministrationPortal)"/>
  34. <!-- MVC -->
  35. <pf:mvc-variables/>
  36. <!-- view modes in CC navigation and search -->
  37. <!--
  38. *
  39. * portal.navigationView = {detailedlist|newspaper}
  40. * default: detailedlist
  41. * Note: newspaper mode is being deprecated!
  42. *
  43. -->
  44. <xsl:variable name="defaultNavigationView">
  45. <xsl:choose>
  46. <xsl:when test="key('session-param', 'displayMode') = 'detail' and /root/configProps/param[@name='cc.nav']/property[@name='portal.navigationView']='newspaper'">newspaper</xsl:when>
  47. <xsl:otherwise>
  48. <xsl:value-of select="key('session-param', 'displayMode')"/>
  49. </xsl:otherwise>
  50. </xsl:choose>
  51. </xsl:variable>
  52. <!-- Start consumer portal params -->
  53. <!-- ========================================================== -->
  54. <!-- Converted path to id. Happens when we pull a path out of CM (since we can't store ids in CM) -->
  55. <xsl:variable name="m_tab_id">
  56. <xsl:choose>
  57. <xsl:when test="string(/root/tabPath_id/cm:queryResponse/cm:pagelet/cm:storeID) != ''">
  58. <xsl:value-of select="string(/root/tabPath_id/cm:queryResponse/cm:pagelet/cm:storeID)"/>
  59. </xsl:when>
  60. <xsl:when test="/root/tabPath_id">
  61. <xsl:value-of select="'null'"/>
  62. </xsl:when>
  63. </xsl:choose>
  64. </xsl:variable>
  65. <xsl:variable name="publicRootID" select="key('session-param', 'prootid')"/>
  66. <xsl:variable name="privateRootID" select="key('session-param', 'mrootid')"/>
  67. <!-- The root of public folders -->
  68. <xsl:variable name="PFRoot">/content</xsl:variable>
  69. <!-- Account -->
  70. <xsl:variable name="accountID" select="key('session-param', 'e_hp')"/>
  71. <!-- Fully qualified personal folder path form -->
  72. <xsl:variable name="FQMFRoot" select="key('session-param', 'e_mrootpath')"/>
  73. <!--
  74. A variable that indicates if we are browsing a user private folder other than the current user.
  75. This might occur if we build a back url with one user logged in,
  76. then the logged in user changes because of a timeout and the back url is invoked with the new user.
  77. -->
  78. <xsl:variable name="is-browsing-updated-user-folder" select="key('env-param', 'mfid') != '' and $privateRootID != '' and not(string(key('env-param', 'mfid')) = $privateRootID)"/>
  79. <!-- The public folders path to default to. -->
  80. <xsl:variable name="defaultContentRoot">
  81. <xsl:choose>
  82. <xsl:when test="key('session-param', 'e_root') and key('session-param', 'e_root') != ''">
  83. <xsl:value-of select="key('session-param', 'e_root')"/>
  84. </xsl:when>
  85. <xsl:otherwise>
  86. <xsl:value-of select="$PFRoot"/>
  87. </xsl:otherwise>
  88. </xsl:choose>
  89. </xsl:variable>
  90. <!-- Series 7 navigation newsbox -->
  91. <xsl:variable name="r_S7nbID" select="string(key('env-param', 'm_nbid'))"/>
  92. <!-- Navigation folder ID in the request context -->
  93. <xsl:variable name="r_folderID">
  94. <xsl:choose>
  95. <xsl:when test="$is-browsing-updated-user-folder">
  96. <!-- The private folder id has changed since we last built this url. Default to the current private folder id. -->
  97. <xsl:value-of select="$privateRootID"/>
  98. </xsl:when>
  99. <xsl:otherwise>
  100. <xsl:value-of select="string(key('env-param', 'm_folder'))"/>
  101. </xsl:otherwise>
  102. </xsl:choose>
  103. </xsl:variable>
  104. <!-- CM search path as derived from the request context -->
  105. <xsl:variable name="r_path">
  106. <xsl:choose>
  107. <!-- If an id is passed in then morph it into a storeID(" ... ") format -->
  108. <xsl:when test="$r_folderID != ''">
  109. <xsl:value-of select="concat('storeID(&quot;', $r_folderID, '&quot;)')"/>
  110. </xsl:when>
  111. <!-- Gracefully recover from malformed searchpath -->
  112. <xsl:when test="starts-with(string(key('env-param', 'm_path')), 'XSSSTART')">
  113. <xsl:value-of select="$defaultContentRoot"/>
  114. </xsl:when>
  115. <!-- xpath-style path -->
  116. <xsl:when test="string(key('env-param', 'm_path')) != ''">
  117. <xsl:value-of select="string(key('env-param', 'm_path'))"/>
  118. </xsl:when>
  119. </xsl:choose>
  120. </xsl:variable>
  121. <!-- Page/tab ID as derived from the request context (in the order of precedence) -->
  122. <xsl:variable name="r_pageID">
  123. <xsl:choose>
  124. <xsl:when test="$m_tab_id != '' and $m_tab_id != 'null'">
  125. <xsl:value-of select="$m_tab_id"/>
  126. </xsl:when>
  127. <xsl:when test="string(key('env-param', 'm_page')) != ''">
  128. <xsl:value-of select="string(key('env-param', 'm_page'))"/>
  129. </xsl:when>
  130. <xsl:when test="string(key('env-param', 'm_tab_override')) != ''">
  131. <xsl:value-of select="string(key('env-param', 'm_tab_override'))"/>
  132. </xsl:when>
  133. <xsl:when test="key('env-param', 'm_tab') and $is-browsing-updated-user-folder">
  134. <!-- The private folder id has changed since we last built this url. Default to the current private folder id. -->
  135. <xsl:value-of select="$privateRootID"/>
  136. </xsl:when>
  137. <xsl:when test="string(key('env-param', 'm_tab')) != ''">
  138. <xsl:value-of select="string(key('env-param', 'm_tab'))"/>
  139. </xsl:when>
  140. <xsl:when test="string(key('env-param', 'm_portlet')) != ''">
  141. <xsl:text>portlet</xsl:text>
  142. </xsl:when>
  143. </xsl:choose>
  144. </xsl:variable>
  145. <!--
  146. Effective page/tab ID - If we don't, that means that:
  147. a)there are no visible portal tabs. or
  148. b) we are navigating **into** PF/MF (i.e. not at the root)
  149. -->
  150. <xsl:variable name="pageID">
  151. <xsl:choose>
  152. <!-- Support old style "PF/MF/Welcome" tabs -->
  153. <xsl:when test="$r_pageID = 'p'">
  154. <xsl:value-of select="$publicRootID"/>
  155. </xsl:when>
  156. <xsl:when test="$r_pageID = 'm'">
  157. <xsl:value-of select="$privateRootID"/>
  158. </xsl:when>
  159. <xsl:when test="$r_pageID = 'w' and key('session-param', 'dcid') != ''">
  160. <xsl:value-of select="key('session-param', 'dcid')"/>
  161. </xsl:when>
  162. <xsl:when test="$r_pageID != ''">
  163. <xsl:value-of select="$r_pageID"/>
  164. </xsl:when>
  165. <!-- No page id is passed in the request. Try and determine the page from the path context (i.e. PF/MF) -->
  166. <!-- Navigation into PF root -->
  167. <xsl:when test="$r_folderID != '' and ($r_folderID = $publicRootID)">
  168. <xsl:value-of select="$publicRootID"/>
  169. </xsl:when>
  170. <!-- Navigation into MF root -->
  171. <xsl:when test="$r_folderID != '' and ($r_folderID = $privateRootID)">
  172. <xsl:value-of select="$privateRootID"/>
  173. </xsl:when>
  174. <!-- Other navigation into PF/MF - leave the page id blank -->
  175. <xsl:when test="$r_path != '' or $r_S7nbID != ''"></xsl:when>
  176. <!-- Special case: Home command pointing to a none-existant custom page using a searchPath. Don't set the page ID to force an error. -->
  177. <xsl:when test="$r_pageID = '' and $m_tab_id = 'null'"/>
  178. <!-- Last resort - Use the first tab in the user's portal tabs -->
  179. <xsl:when test="key('session-param', 'dcid') != ''">
  180. <xsl:value-of select="key('session-param', 'dcid')"/>
  181. </xsl:when>
  182. <!-- No page context. -->
  183. </xsl:choose>
  184. </xsl:variable>
  185. <!-- Page type flags -->
  186. <xsl:variable name="isCustomPage" select="$pageID != '' and $pageID != $publicRootID and $pageID != $privateRootID"/>
  187. <xsl:variable name="isPFMF" select="($pageID = '' and ($r_path != '' or $r_S7nbID != '')) or $pageID = $publicRootID or $pageID = $privateRootID"/>
  188. <xsl:variable name="isCustomPageSearch" select="$isCustomPage and /root/search"/>
  189. <xsl:variable name="cpstarget-param" select="key('env-param', 'cpstarget')"/>
  190. <xsl:variable name="pageType">
  191. <xsl:choose>
  192. <xsl:when test="$cpstarget-param">custom</xsl:when>
  193. <xsl:when test="$isCustomPageSearch">customsearch</xsl:when>
  194. <xsl:when test="$isCustomPage">custom</xsl:when>
  195. <xsl:when test="$isPFMF">PFMF</xsl:when>
  196. <xsl:otherwise><!-- we don't know - leave blank --></xsl:otherwise>
  197. </xsl:choose>
  198. </xsl:variable>
  199. <!-- Effective navigation path - This is the path used in a CM query -->
  200. <xsl:variable name="path">
  201. <xsl:choose>
  202. <xsl:when test="$pageType = 'customsearch'">
  203. <!-- Pretend to be on MF page when running a search query in a custom page -->
  204. <xsl:value-of select="$FQMFRoot"/>
  205. </xsl:when>
  206. <!-- We have a path in the request -->
  207. <xsl:when test="$r_path != ''">
  208. <xsl:value-of select="$r_path"/>
  209. </xsl:when>
  210. <!-- We don't have a path in the request but we are showing the PF tab. Set the navigation to the default root. -->
  211. <xsl:when test="$pageID = $publicRootID">
  212. <xsl:value-of select="$defaultContentRoot"/>
  213. </xsl:when>
  214. <!-- We don't have a path in the request but we are showing the MF tab. Set the navigation to the default MF root. -->
  215. <xsl:when test="$pageID = $privateRootID">
  216. <xsl:value-of select="concat('storeID(&quot;', $privateRootID, '&quot;)')"/>
  217. </xsl:when>
  218. </xsl:choose>
  219. </xsl:variable>
  220. <!-- Page viewer vs. portal -->
  221. <xsl:variable name="displayMode">
  222. <xsl:choose>
  223. <xsl:when test="$pageID != '' and key('env-param', 'm_page') and not(key('env-param', 'm_tab')) and not(key('env-param', 'm_tab_override'))">viewer</xsl:when>
  224. <xsl:when test="$pageID = 'portlet'">viewer</xsl:when>
  225. <xsl:otherwise>portal</xsl:otherwise>
  226. </xsl:choose>
  227. </xsl:variable>
  228. <!-- End consumer portal params -->
  229. <!-- Start S7 integration params -->
  230. <!-- ========================================================== -->
  231. <!-- indicates if we navigating within an Upfront Newsbox -->
  232. <xsl:variable name="isNBIDInContext" select="$r_S7nbID != '' and $isPFMF"/>
  233. <xsl:variable name="isPublicRootNavigation" select="($path = $PFRoot or $path = concat('storeID(&quot;', $publicRootID, '&quot;)')) and $isPFMF"/>
  234. <xsl:variable name="isPersonalRootNavigation" select="($path = $FQMFRoot or $path = '~/folder' or $path = concat('storeID(&quot;', $privateRootID, '&quot;)')) and $isPFMF"/>
  235. <xsl:variable name="getUpfrontContent"
  236. select="(/root/setCookies/cookie[@name='AS_TICKET'] or /root/cookies/cookie[@name='AS_TICKET'])
  237. and
  238. key('session-param', 's7e')
  239. and
  240. ($isPublicRootNavigation or $isPersonalRootNavigation or $isNBIDInContext)"/>
  241. <!-- End S7 integration params -->
  242. <!-- Start cache control params -->
  243. <!-- ========================================================== -->
  244. <!--
  245. Don't add any cache validation control (pretend that caching is not enabled) if we are:
  246. - generating a response to a post request or
  247. - generating a response that has Series7 content in it or
  248. - doing an index search
  249. -->
  250. <!-- Current CC ETag -->
  251. <xsl:variable name="index_search" select="string(/root/search/navSearchSpec/*[local-name()='searchType']) = 'content'"/>
  252. <xsl:variable name="ccCanCache" select="not(key('session-param', 'no304')) and /root/http/param[@name='REQUEST_METHOD'] = 'GET' and not($getUpfrontContent) and not($index_search)"/>
  253. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  254. <xsl:variable name="uiState"><xsl:value-of select="/root/session"/></xsl:variable>
  255. <xsl:variable name="ccETag">
  256. <xsl:choose>
  257. <xsl:when test="$ccCanCache and /root/cookies/cookie[@name='cc_session'] !='' and not(key('env-param', 'refresh')) and not(key('env-param', 'm_reload'))">
  258. <xsl:value-of select="xtsext:checksum(concat($passport, $uiState))"/>
  259. </xsl:when>
  260. <xsl:otherwise>0</xsl:otherwise>
  261. </xsl:choose>
  262. </xsl:variable>
  263. <xsl:variable name="cc-val" select="substring-after(substring-before(/root/http/param[@name='IF-NONE-MATCH'], ':'), '&quot;')"/>
  264. <xsl:variable name="ccETagUsable" select="$ccCanCache and string($cc-val) = string($ccETag)"/>
  265. <xsl:variable name="content-val" select="substring-before(substring-after(/root/http/param[@name='IF-NONE-MATCH'], ':'), '&quot;')"/>
  266. <xsl:variable name="content-validator">
  267. <xsl:if test="string($content-val) != '' and $ccETagUsable">
  268. <xsl:value-of select="$content-val"/>
  269. </xsl:if>
  270. </xsl:variable>
  271. <!-- End cache control params -->
  272. <xsl:template match="/root">
  273. <cml:object-predicates/>
  274. <xts:sequence>
  275. <!-- If we have a tab override then make sure it becomes the current context tab. -->
  276. <xsl:if test="key('env-param', 'm_tab_override')">
  277. <xsl:choose>
  278. <xsl:when test="key('env-param', 'm_tab')">
  279. <xts:replace select="/root/env/param[@name='m_tab']">
  280. <param name="m_tab"><xsl:value-of select="key('env-param', 'm_tab_override')"/></param>
  281. </xts:replace>
  282. </xsl:when>
  283. <xsl:otherwise>
  284. <xts:append select="/root/env">
  285. <param name="m_tab"><xsl:value-of select="key('env-param', 'm_tab_override')"/></param>
  286. </xts:append>
  287. </xsl:otherwise>
  288. </xsl:choose>
  289. </xsl:if>
  290. <!-- If we have a tab path that was previously converted to id then set the current tab to that id and adjust the environment accordingly so that the state can be correctly calculated. -->
  291. <xsl:if test="/root/tabPath_id">
  292. <xsl:choose>
  293. <xsl:when test="key('env-param', 'm_tab')">
  294. <xts:replace select="/root/env/param[@name='m_tab']">
  295. <param name="m_tab"><xsl:value-of select="/root/tabPath_id/*/*/cm:storeID"/></param>
  296. </xts:replace>
  297. </xsl:when>
  298. <xsl:otherwise>
  299. <xts:append select="/root/env">
  300. <param name="m_tab"><xsl:value-of select="/root/tabPath_id/*/*/cm:storeID"/></param>
  301. </xts:append>
  302. </xsl:otherwise>
  303. </xsl:choose>
  304. </xsl:if>
  305. <!-- Start CPS params -->
  306. <!-- ========================================================== -->
  307. <xsl:variable name="portlet-param" select="key('env-param', 'm_portlet')"/>
  308. <xsl:variable name="cps-package">
  309. <xsl:choose>
  310. <xsl:when test="$pageID = 'portlet'">
  311. <xsl:value-of select="concat('/', substring-before(substring-after($portlet-param, '/'), '/'))"/>
  312. </xsl:when>
  313. <xsl:otherwise>
  314. <xsl:text>/connection</xsl:text>
  315. </xsl:otherwise>
  316. </xsl:choose>
  317. </xsl:variable>
  318. <xsl:variable name="cps-pagelet">
  319. <xsl:choose>
  320. <xsl:when test="$pageID = 'portlet'">
  321. <xsl:value-of select="concat('/', substring-after(substring-after($portlet-param, '/'), '/'))"/>
  322. </xsl:when>
  323. <xsl:otherwise>
  324. <xsl:value-of select="concat('/', $pageID)"/>
  325. </xsl:otherwise>
  326. </xsl:choose>
  327. </xsl:variable>
  328. <xsl:variable name="cps-path" select="concat($cps-package, $cps-pagelet)"/>
  329. <xsl:variable name="page-state-param" select="key('env-param', 'm_state')"/>
  330. <xsl:variable name="page-state">
  331. <xsl:if test="$page-state-param">
  332. <xsl:value-of select="$page-state-param"/>
  333. </xsl:if>
  334. </xsl:variable>
  335. <!--
  336. This variable is used to check if the state is specified on the url.
  337. 'false' means that we need to get the pagelet state from cm.
  338. -->
  339. <xsl:variable name="is-page-state-param" select="$page-state-param"/>
  340. <xsl:variable name="is-page-state-id" select="starts-with($page-state, 'ID:')"/>
  341. <!-- delete cpstarget -->
  342. <xsl:if test="$cpstarget-param">
  343. <xts:delete select="/root/env/param[@name = 'cpstarget']"/>
  344. </xsl:if>
  345. <!-- End CPS params -->
  346. <!-- Execute the request -->
  347. <xsl:choose>
  348. <xsl:when test="$is-page-state-id">
  349. <xts:append>
  350. <state>
  351. <id>
  352. <xsl:value-of select="$page-state"/>
  353. </id>
  354. </state>
  355. </xts:append>
  356. </xsl:when>
  357. <xsl:when test="$is-page-state-param">
  358. <xts:append>
  359. <state>
  360. <cps:pageletContext>
  361. <cps:path>
  362. <xsl:value-of select="$cps-path"/>
  363. </cps:path>
  364. <cps:state>
  365. <xsl:value-of select="$page-state"/>
  366. </cps:state>
  367. </cps:pageletContext>
  368. </state>
  369. </xts:append>
  370. </xsl:when>
  371. </xsl:choose>
  372. <xts:append>
  373. <!-- Portal Pages -->
  374. <!-- ========================================================================= -->
  375. <TDS-response>
  376. <xsl:element name="queryReply" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  377. <xsl:element name="runTimeState" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  378. <xts:function name="TDSRequest">
  379. <xts:param name="action">get</xts:param>
  380. <xts:param name="session-id"><xsl:value-of select="$passport"/></xts:param>
  381. <xts:param name="name"><xsl:value-of select="'ccPages'"/></xts:param>
  382. </xts:function>
  383. </xsl:element>
  384. </xsl:element>
  385. <xsl:if test="$pageType = 'custom'">
  386. <xsl:variable name="package-name" select="xtsext:web64encode($cps-package, false())"/>
  387. <xsl:variable name="pagelet-name" select="xtsext:web64encode($cps-path, false())"/>
  388. <xsl:element name="queryReply" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  389. <xsl:element name="runTimeState" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  390. <xts:function name="TDSRequest">
  391. <xts:param name="action">get</xts:param>
  392. <xts:param name="session-id"><xsl:value-of select="$passport"/></xts:param>
  393. <xts:param name="map-id"><xsl:value-of select="'portlets'"/></xts:param>
  394. <xts:param name="name"><xsl:value-of select="$package-name"/></xts:param>
  395. </xts:function>
  396. </xsl:element>
  397. </xsl:element>
  398. <xsl:choose>
  399. <xsl:when test="$is-page-state-id">
  400. <xsl:element name="queryReply" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  401. <xsl:element name="runTimeState" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  402. <xts:function name="TDSRequest">
  403. <xts:param name="action">get</xts:param>
  404. <xts:param name="session-id"><xsl:value-of select="$passport"/></xts:param>
  405. <xts:param name="map-id"><xsl:value-of select="'portlets'"/></xts:param>
  406. <xts:param name="name"><xsl:value-of select="$page-state"/></xts:param>
  407. </xts:function>
  408. </xsl:element>
  409. </xsl:element>
  410. </xsl:when>
  411. <xsl:when test="not($displayMode = 'viewer' or $is-page-state-param)">
  412. <xsl:element name="queryReply" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  413. <xsl:element name="runTimeState" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  414. <xts:function name="TDSRequest">
  415. <xts:param name="action">get</xts:param>
  416. <xts:param name="session-id"><xsl:value-of select="$passport"/></xts:param>
  417. <xts:param name="map-id"><xsl:value-of select="'portlets'"/></xts:param>
  418. <xts:param name="name"><xsl:value-of select="$pagelet-name"/></xts:param>
  419. </xts:function>
  420. </xsl:element>
  421. </xsl:element>
  422. </xsl:when>
  423. </xsl:choose>
  424. </xsl:if>
  425. </TDS-response>
  426. </xts:append>
  427. <xts:append>
  428. <!-- Share the the page context information calculated above with other blocks -->
  429. <page>
  430. <id><xsl:value-of select="$pageID"/></id>
  431. <type><xsl:value-of select="$pageType"/></type>
  432. <navPath><xsl:value-of select="$path"/></navPath>
  433. <displayMode><xsl:value-of select="$displayMode"/></displayMode>
  434. <defaultContentRoot><xsl:value-of select="$defaultContentRoot"/></defaultContentRoot>
  435. <cache>
  436. <ccETag><xsl:value-of select="$ccETag"/></ccETag>
  437. <ccCanCache><xsl:value-of select="string($ccCanCache)"/></ccCanCache>
  438. <ccETagUsable><xsl:value-of select="string($ccETagUsable)"/></ccETagUsable>
  439. <contentValidator><xsl:value-of select="$content-validator"/></contentValidator>
  440. </cache>
  441. </page>
  442. <!-- Get general "advanced settings" configuration -->
  443. <generalConfigSettings>
  444. <xts:function name="getConfiguration">
  445. <xts:param name="portal.disablecmsearch"/>
  446. <xts:param name="portal.launchBusinessInsightChromeless"/>
  447. <xts:param name="edition"/>
  448. </xts:function>
  449. </generalConfigSettings>
  450. <!-- Get configuration information (used for PP objects) -->
  451. <gatewayURI>
  452. <xts:function name="getConfiguration">
  453. <xts:param name="gateway"/>
  454. </xts:function>
  455. </gatewayURI>
  456. <!-- MVC - read mvc configuration settings -->
  457. <xsl:if test="$mvc-N-enabled and not(/root/mvcSettings)">
  458. <mvcSettings>
  459. <xts:function name="getConfiguration">
  460. <xts:param name="MVC_remoteGateway"/>
  461. <xts:param name="MVC_remoteWebContent"/>
  462. <xts:param name="MVC_domain"/>
  463. <xts:param name="MVC_disableAutoLogOn"/>
  464. </xts:function>
  465. </mvcSettings>
  466. </xsl:if>
  467. <xsl:choose>
  468. <xsl:when test="not($isNBIDInContext) and ($path != '' or key('env-param', 'search')) and ($isPFMF or $isCustomPageSearch)">
  469. <cmContent>
  470. <send:request provider="cm2" postxslt="transforms/CM/post-process-main.xslt" requester="ps:cc.main.nav">
  471. <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsd:dummy="">
  472. <requests xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:queryRequest[]">
  473. <!-- Fetch data for PF or MF if we are showing PF/MF tabs or and we have a none-empty searchPath or we are in search mode. -->
  474. <!-- <xsl:if test="not($isNBIDInContext) and ($path != '' or key('env-param', 'search')) and ($isPFMF or $isCustomPageSearch)"> -->
  475. <xsl:variable name="maxObjects">
  476. <xsl:if test="($defaultNavigationView = 'list' or $defaultNavigationView = 'detail') or string(search/expression)!=''">
  477. <xsl:choose>
  478. <xsl:when test="/root/search/expression">
  479. <xsl:choose>
  480. <xsl:when test="string(key('env-param','m_pagertosearch')) !='' and string(key('env-param','m_pagerfromsearch')) !=''"><xsl:value-of select="key('env-param','m_pagertosearch') - key('env-param','m_pagerfromsearch') + 1"/>
  481. </xsl:when>
  482. <xsl:when test="string(key('session-param', 'linesPerPage'))!=''">
  483. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  484. </xsl:when>
  485. <xsl:otherwise>
  486. <xsl:text>15</xsl:text>
  487. </xsl:otherwise>
  488. </xsl:choose>
  489. </xsl:when>
  490. <xsl:otherwise>
  491. <xsl:choose>
  492. <xsl:when test="string(key('env-param','m_pagerto')) !='' and string(key('env-param','m_pagerfrom')) !=''"><xsl:value-of select="key('env-param','m_pagerto') - key('env-param','m_pagerfrom') + 1"/></xsl:when>
  493. <xsl:when test="string(key('session-param', 'linesPerPage'))!=''">
  494. <xsl:value-of select="key('session-param', 'linesPerPage')"/>
  495. </xsl:when>
  496. <xsl:otherwise>
  497. <xsl:text>15</xsl:text>
  498. </xsl:otherwise>
  499. </xsl:choose>
  500. </xsl:otherwise>
  501. </xsl:choose>
  502. </xsl:if>
  503. </xsl:variable>
  504. <xsl:variable name="m_sort" select="key('session-param', 's_cc')"/>
  505. <xsl:variable name="skipObjects">
  506. <xsl:choose>
  507. <xsl:when test="($defaultNavigationView = 'list' or $defaultNavigationView = 'detail') or string(search/expression) != ''">
  508. <xsl:choose>
  509. <xsl:when test="/root/search/expression">
  510. <xsl:choose>
  511. <xsl:when test="key('env-param', 'm_pagerfromsearch') and string(key('env-param', 'm_pagerfromsearch'))!=''">
  512. <xsl:value-of select="(key('env-param','m_pagerfromsearch'))-1"/>
  513. </xsl:when>
  514. <xsl:when test="key('env-param', 'm_searchsection') != ''">
  515. <xsl:choose>
  516. <xsl:when test="key('env-param', 'm_searchsection') != '-1'">
  517. <xsl:value-of select="((key('env-param', 'm_searchsection')) -1)"/>
  518. </xsl:when>
  519. <xsl:otherwise>
  520. <xsl:value-of select="($maxObjects) * -1"/>
  521. </xsl:otherwise>
  522. </xsl:choose>
  523. </xsl:when>
  524. <xsl:otherwise>0</xsl:otherwise>
  525. </xsl:choose>
  526. </xsl:when>
  527. <xsl:otherwise>
  528. <xsl:choose>
  529. <xsl:when test="key('env-param', 'm_pagerfrom') and string(key('env-param', 'm_pagerfrom'))!=''"><xsl:value-of select="(key('env-param','m_pagerfrom'))-1"/></xsl:when>
  530. <xsl:when test="key('env-param', 'm_section') != ''">
  531. <xsl:choose>
  532. <xsl:when test="key('env-param', 'm_section') != '-1'">
  533. <xsl:value-of select="((key('env-param', 'm_section')) -1)"/>
  534. </xsl:when>
  535. <xsl:otherwise>
  536. <xsl:value-of select="($maxObjects) * -1"/>
  537. </xsl:otherwise>
  538. </xsl:choose>
  539. </xsl:when>
  540. <xsl:otherwise>0</xsl:otherwise>
  541. </xsl:choose>
  542. </xsl:otherwise>
  543. </xsl:choose>
  544. </xsl:when>
  545. <xsl:otherwise>0</xsl:otherwise>
  546. </xsl:choose>
  547. </xsl:variable>
  548. <!-- Base search query for the current container properties -->
  549. <!-- =========================================================================-->
  550. <item xsi:type="cm:queryRequest">
  551. <search>
  552. <xsl:value-of select="$path"/>
  553. </search>
  554. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  555. <item xsi:type="cm:propEnum">defaultName</item>
  556. <item xsi:type="cm:propEnum">tenantID</item>
  557. <item xsi:type="cm:propEnum">searchPath</item>
  558. <item xsi:type="cm:propEnum">ancestors</item>
  559. <item xsi:type="cm:propEnum">iconURI</item>
  560. <item xsi:type="cm:propEnum">packageBase</item>
  561. <item xsi:type="cm:propEnum">storeID</item>
  562. <item xsi:type="cm:propEnum">permissions</item>
  563. <item xsi:type="cm:propEnum">launchableType</item>
  564. <xsl:if test="$mvc-N-enabled">
  565. <item xsi:type="cm:propEnum">specification</item> <!-- MVC -->
  566. </xsl:if>
  567. <xsl:if test="key('session-param', 'pccEnabled')">
  568. <item xsi:type="cm:propEnum">effectiveUserCapabilities</item>
  569. </xsl:if>
  570. <item xsi:type="cm:propEnum">hidden</item>
  571. <xsl:if test="key('env-param', 'feed') = 'rss'">
  572. <item xsi:type="cm:propEnum">defaultDescription</item>
  573. </xsl:if>
  574. </properties>
  575. </item>
  576. <!-- Child objects if we are running a search query or we are inside of a folder -->
  577. <!-- ==================================================================================== -->
  578. <xsl:if test="search/expression or not(search)">
  579. <item xsi:type="cm:queryRequest">
  580. <search>
  581. <xsl:choose>
  582. <xsl:when test="search/expression">
  583. <xsl:value-of select="search/expression"/>
  584. </xsl:when>
  585. <xsl:otherwise>
  586. <!-- XTS queryValue was introduced as a preformance enhancement, simply add hidden-object-predicate to visible param value -->
  587. <xsl:value-of select="$path"/>/*<xts:queryValue select="/root/system/param[@name='visible']"/><xsl:value-of select="$hidden-objects-predicate"/>[@objectClass!='model' and @objectClass!='drillPath' and @objectClass!='packageConfiguration']<xsl:text/>
  588. </xsl:otherwise>
  589. </xsl:choose>
  590. </search>
  591. <!-- ===== Specify child object properties ===== -->
  592. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  593. <item xsi:type="cm:propEnum">defaultName</item>
  594. <item xsi:type="cm:propEnum">tenantID</item>
  595. <item xsi:type="cm:propEnum">defaultOutputFormat</item>
  596. <item xsi:type="cm:propEnum">defaultPortalAction</item>
  597. <item xsi:type="cm:propEnum">mostRecentEventList</item>
  598. <item xsi:type="cm:propEnum">executionLocale</item>
  599. <item xsi:type="cm:propEnum">executionFormat</item>
  600. <item xsi:type="cm:propEnum">executionPrompt</item>
  601. <item xsi:type="cm:propEnum">searchPath</item>
  602. <item xsi:type="cm:propEnum">uri</item>
  603. <item xsi:type="cm:propEnum">iconURI</item>
  604. <item xsi:type="cm:propEnum">base</item>
  605. <xsl:if test="key('session-param', 'pccEnabled')">
  606. <item xsi:type="cm:propEnum">metadataModelPackage</item>
  607. <item xsi:type="cm:propEnum">effectiveUserCapabilities</item>
  608. </xsl:if>
  609. <item xsi:type="cm:propEnum">modificationTime</item>
  610. <item xsi:type="cm:propEnum">format</item>
  611. <item xsi:type="cm:propEnum">contentLocale</item>
  612. <item xsi:type="cm:propEnum">defaultScreenTip</item>
  613. <item xsi:type="cm:propEnum">permissions</item>
  614. <item xsi:type="cm:propEnum">metadata</item>
  615. <item xsi:type="cm:propEnum">usage</item>
  616. <item xsi:type="cm:propEnum">target</item><!-- shortcut objects -->
  617. <item xsi:type="cm:propEnum">disabled</item>
  618. <item xsi:type="cm:propEnum">hasPrompts</item>
  619. <item xsi:type="cm:propEnum">gateway</item>
  620. <item xsi:type="cm:propEnum">cubeContentName</item>
  621. <item xsi:type="cm:propEnum">options</item>
  622. <item xsi:type="cm:propEnum">userInterfaces</item>
  623. <item xsi:type="cm:propEnum">documentType</item>
  624. <item xsi:type="cm:propEnum">storeID</item>
  625. <item xsi:type="cm:propEnum">dataType</item>
  626. <item xsi:type="cm:propEnum">launchableType</item>
  627. <item xsi:type="cm:propEnum">hidden</item>
  628. <xsl:choose>
  629. <xsl:when test="key('env-param', 'feed') = 'rss'">
  630. <item xsi:type="cm:propEnum">defaultDescription</item>
  631. </xsl:when>
  632. <xsl:when test="($defaultNavigationView = 'list' or $defaultNavigationView = 'detail') or string(search/expression) != ''">
  633. <item xsi:type="cm:propEnum">position</item>
  634. <xsl:if test="$defaultNavigationView = 'detail'">
  635. <item xsi:type="cm:propEnum">defaultDescription</item>
  636. </xsl:if>
  637. </xsl:when>
  638. <xsl:otherwise>
  639. <item xsi:type="cm:propEnum">defaultDescription</item>
  640. </xsl:otherwise>
  641. </xsl:choose>
  642. <!-- If we are doing search then ask for ancestors too -->
  643. <xsl:if test="search/expression">
  644. <item xsi:type="cm:propEnum">ancestors</item>
  645. </xsl:if>
  646. </properties>
  647. <!-- ===== Query options ===== -->
  648. <options xsi:type="cm:queryOptions">
  649. <!-- Add paging attributes if we are in list mode -->
  650. <xsl:if test="($defaultNavigationView = 'list' or $defaultNavigationView = 'detail') or string(search/expression) != ''">
  651. <maxObjects xsi:type="xsd:integer"><xsl:value-of select="$maxObjects + 1"/></maxObjects>
  652. <skipObjects xsi:type="xsd:integer"><xsl:value-of select="$skipObjects"/></skipObjects>
  653. </xsl:if>
  654. <!-- Specify which properties to retrieve for referenced objects like shortcuts and report views -->
  655. <refProps xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:refProp[]">
  656. <item xsi:type="cm:refProp">
  657. <refPropName xsi:type="cm:propEnum">target</refPropName>
  658. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  659. <item xsi:type="cm:propEnum">searchPath</item>
  660. <item xsi:type="cm:propEnum">defaultName</item>
  661. <item xsi:type="cm:propEnum">defaultOutputFormat</item>
  662. <item xsi:type="cm:propEnum">defaultPortalAction</item>
  663. <item xsi:type="cm:propEnum">mostRecentEventList</item>
  664. <item xsi:type="cm:propEnum">executionLocale</item>
  665. <item xsi:type="cm:propEnum">executionFormat</item>
  666. <item xsi:type="cm:propEnum">executionPrompt</item>
  667. <item xsi:type="cm:propEnum">uri</item>
  668. <item xsi:type="cm:propEnum">base</item>
  669. <item xsi:type="cm:propEnum">format</item>
  670. <item xsi:type="cm:propEnum">contentLocale</item>
  671. <item xsi:type="cm:propEnum">permissions</item>
  672. <item xsi:type="cm:propEnum">metadata</item>
  673. <item xsi:type="cm:propEnum">usage</item>
  674. <item xsi:type="cm:propEnum">disabled</item>
  675. <item xsi:type="cm:propEnum">userInterfaces</item>
  676. <item xsi:type="cm:propEnum">storeID</item>
  677. <item xsi:type="cm:propEnum">gateway</item>
  678. <item xsi:type="cm:propEnum">options</item>
  679. <item xsi:type="cm:propEnum">documentType</item>
  680. <item xsi:type="cm:propEnum">dataType</item>
  681. <item xsi:type="cm:propEnum">launchableType</item>
  682. </properties>
  683. </item>
  684. <!-- base info for reportView objects -->
  685. <item xsi:type="cm:refProp">
  686. <refPropName xsi:type="cm:propEnum">base</refPropName>
  687. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  688. <item xsi:type="cm:propEnum">searchPath</item>
  689. <item xsi:type="cm:propEnum">permissions</item>
  690. <item xsi:type="cm:propEnum">defaultOutputFormat</item>
  691. <item xsi:type="cm:propEnum">executionFormat</item>
  692. <item xsi:type="cm:propEnum">defaultPortalAction</item>
  693. <item xsi:type="cm:propEnum">mostRecentEventList</item>
  694. <item xsi:type="cm:propEnum">disabled</item>
  695. <item xsi:type="cm:propEnum">storeID</item>
  696. </properties>
  697. </item>
  698. <!-- package for report objects -->
  699. <xsl:if test="key('session-param', 'pccEnabled')">
  700. <item xsi:type="cm:refProp">
  701. <refPropName xsi:type="cm:propEnum">metadataModelPackage</refPropName>
  702. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  703. <item xsi:type="cm:propEnum">effectiveUserCapabilities</item>
  704. </properties>
  705. </item>
  706. </xsl:if>
  707. </refProps>
  708. </options>
  709. <!-- ===== Specify sort options if we are not doing a search on ALL (public and personal) folders ===== -->
  710. <sortBy xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:sort[]">
  711. <xsl:if test="key('session-param', 'eom') != '2'">
  712. <xsl:choose>
  713. <xsl:when test="key('session-param', 'eom') = '0'">
  714. <item xsi:type="cm:sort">
  715. <propName xsi:type="cm:propEnum">usage</propName>
  716. <order xsi:type="cm:orderEnum">ascending</order>
  717. </item>
  718. </xsl:when>
  719. <xsl:otherwise>
  720. <item xsi:type="cm:sort">
  721. <propName xsi:type="cm:propEnum">usage</propName>
  722. <order xsi:type="cm:orderEnum">descending</order>
  723. </item>
  724. </xsl:otherwise>
  725. </xsl:choose>
  726. </xsl:if>
  727. <xsl:choose>
  728. <xsl:when test="$m_sort = 'da'">
  729. <item xsi:type="cm:sort">
  730. <propName xsi:type="cm:propEnum">modificationTime</propName>
  731. <order xsi:type="cm:orderEnum">ascending</order>
  732. </item>
  733. </xsl:when>
  734. <xsl:when test="$m_sort = 'dd'">
  735. <item xsi:type="cm:sort">
  736. <propName xsi:type="cm:propEnum">modificationTime</propName>
  737. <order xsi:type="cm:orderEnum">descending</order>
  738. </item>
  739. </xsl:when>
  740. <xsl:when test="$m_sort = 'nd'">
  741. <item xsi:type="cm:sort">
  742. <propName xsi:type="cm:propEnum">defaultName</propName>
  743. <order xsi:type="cm:orderEnum">descending</order>
  744. </item>
  745. </xsl:when>
  746. <xsl:when test="$m_sort = 'na'">
  747. <item xsi:type="cm:sort">
  748. <propName xsi:type="cm:propEnum">defaultName</propName>
  749. <order xsi:type="cm:orderEnum">ascending</order>
  750. </item>
  751. </xsl:when>
  752. <xsl:otherwise>
  753. <xsl:if test="not(search/expression)">
  754. <item xsi:type="cm:sort">
  755. <propName xsi:type="cm:propEnum">displaySequence</propName>
  756. <order xsi:type="cm:orderEnum">descending</order>
  757. </item>
  758. </xsl:if>
  759. <item xsi:type="cm:sort">
  760. <propName xsi:type="cm:propEnum">defaultName</propName>
  761. <order xsi:type="cm:orderEnum">ascending</order>
  762. </item>
  763. </xsl:otherwise>
  764. </xsl:choose>
  765. </sortBy>
  766. </item>
  767. </xsl:if>
  768. <!-- </xsl:if> -->
  769. </requests>
  770. <!--
  771. Calculate the value of the validator tag. If caching is turned on then perform a check to see if we need to send the validator tag to CM.
  772. Otherwise leave this var empty. This only applies to the the content tabs (PF/MF) only.
  773. -->
  774. <xsl:if test="$isPFMF or $isCustomPageSearch">
  775. <!-- Add the options element with a cache validator -->
  776. <options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:queryMultipleOptions">
  777. <cacheValidator xsi:type="xsd:string"><xsl:value-of select="$content-validator"/></cacheValidator>
  778. </options>
  779. </xsl:if>
  780. </cm:query>
  781. </send:request>
  782. </cmContent>
  783. </xsl:when>
  784. <xsl:otherwise>
  785. <cmContent>
  786. <queryResponse xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  787. <xsl:element name="queryReply" xmlns="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"/>
  788. </queryResponse>
  789. </cmContent>
  790. </xsl:otherwise>
  791. </xsl:choose>
  792. </xts:append>
  793. <xts:insert select="/root/*[local-name()='cmContent']/*[local-name()='queryResponse']/*[local-name()='queryReply'][1]">
  794. <xts:queryNode select="/root/TDS-response/*"/>
  795. </xts:insert>
  796. <!-- Do clean up -->
  797. <xts:delete select="/root/env/param[starts-with(@name,'pager')]"/>
  798. <xts:delete select="/root/*[local-name()='TDS-response']"/>
  799. </xts:sequence>
  800. <!-- Get Upfront data -->
  801. <xsl:if test="$getUpfrontContent = 'true'">
  802. <xsl:variable name="ticket">
  803. <xsl:choose>
  804. <xsl:when test="string(setCookies/cookie[@name='AS_TICKET']) != ''">
  805. <xsl:value-of select="setCookies/cookie[@name='AS_TICKET']"/>
  806. </xsl:when>
  807. <xsl:otherwise>
  808. <xsl:value-of select="cookies/cookie[@name='AS_TICKET']"/>
  809. </xsl:otherwise>
  810. </xsl:choose>
  811. </xsl:variable>
  812. <xts:sequence>
  813. <xsl:if test="substring-after(key('env-param', 'm_nbid'), '-') = ''">
  814. <!-- get the system or user information (root newsboxid or personal newsboxid) -->
  815. <xts:append>
  816. <xts:transform src="transforms/upfront/post-process.xslt" processor="XSLT">
  817. <xts:request protocol="COGX" href="cogx://upfront" faultBlock="generic-fb">
  818. <xts:param name="host"><xts:queryValue select="/root/system/param[@name='series7']/host"/></xts:param>
  819. <xts:param name="port"><xts:queryValue select="/root/system/param[@name='series7']/port"/></xts:param>
  820. <xts:param name="encoding"><xts:queryValue select="/root/system/param[@name='series7']/encoding"/></xts:param>
  821. <envelope xmlns="http://developer.cognos.com/schemas/cogx/">
  822. <routing xmlns="http://developer.cognos.com/schemas/cogx/">
  823. <apiversion>2.0</apiversion>
  824. <sender component="CC" version="1.0" msgversion="3.0"/>
  825. <target>upfront</target>
  826. </routing>
  827. <command xmlns="http://developer.cognos.com/schemas/cogx/">
  828. <apiversion>3.0</apiversion>
  829. <sender component="CC" version="1.0" msgversion="3.0"/>
  830. <messageattribute>
  831. <ticket>
  832. <xsl:value-of select="$ticket"/>
  833. </ticket>
  834. <language><xsl:value-of select="user/param[@name='productLocale']"/></language>
  835. <locale><xsl:value-of select="user/param[@name='contentLocale']"/></locale>
  836. <timezoneid><xsl:value-of select="user/param[@name='timeZoneID']"/></timezoneid>
  837. </messageattribute>
  838. <message>
  839. <xsl:choose>
  840. <xsl:when test="$isPublicRootNavigation">
  841. <DescribeSystem xmlns="http://developer.cognos.com/schemas/upfront/"/>
  842. </xsl:when>
  843. <xsl:otherwise>
  844. <DescribeUser xmlns="http://developer.cognos.com/schemas/upfront/"/>
  845. </xsl:otherwise>
  846. </xsl:choose>
  847. </message>
  848. </command>
  849. </envelope>
  850. </xts:request>
  851. </xts:transform>
  852. </xts:append>
  853. </xsl:if>
  854. <xts:append>
  855. <upfContent>
  856. <xts:transform src="transforms/upfront/post-process.xslt" processor="XSLT">
  857. <root>
  858. <pr>
  859. <xsl:value-of select="key('session-param', 'e_proot')"/>
  860. </pr>
  861. <mr>
  862. <xsl:value-of select="key('session-param', 'e_mroot')"/>
  863. </mr>
  864. <prid>
  865. <xsl:value-of select="key('session-param', 'prootid')"/>
  866. </prid>
  867. <mrid>
  868. <xsl:value-of select="key('session-param', 'mrootid')"/>
  869. </mrid>
  870. <mfpath>
  871. <xsl:value-of select="key('session-param', 'e_mrootpath')"/>
  872. </mfpath>
  873. <tab>
  874. <xsl:choose>
  875. <xsl:when test="substring-before(key('env-param', 'm_nbid'), '-') != ''"><xsl:value-of select="substring-before(key('env-param', 'm_nbid'), '-')"/></xsl:when>
  876. <xsl:when test="$isPublicRootNavigation">p</xsl:when>
  877. <xsl:otherwise>m</xsl:otherwise>
  878. </xsl:choose>
  879. </tab>
  880. <nbid>
  881. <xsl:value-of select="substring-after(env/param[@name='m_nbid'], '-')"/>
  882. </nbid>
  883. <xts:request protocol="COGX" href="cogx://upfront" faultBlock="generic-fb">
  884. <xts:param name="host"><xts:queryValue select="/root/system/param[@name='series7']/host"/></xts:param>
  885. <xts:param name="port"><xts:queryValue select="/root/system/param[@name='series7']/port"/></xts:param>
  886. <xts:param name="encoding"><xts:queryValue select="/root/system/param[@name='series7']/encoding"/></xts:param>
  887. <envelope xmlns="http://developer.cognos.com/schemas/cogx/">
  888. <routing xmlns="http://developer.cognos.com/schemas/cogx/">
  889. <apiversion>2.0</apiversion>
  890. <dispatcher did="cogx://upfront:8030"/>
  891. <sender component="CC" version="1.0" msgversion="3.0"/>
  892. <target>upfront</target>
  893. </routing>
  894. <command xmlns="http://developer.cognos.com/schemas/cogx/">
  895. <apiversion>3.0</apiversion>
  896. <sender component="CC" version="1.0" msgversion="3.0"/>
  897. <messageattribute>
  898. <ticket>
  899. <xsl:value-of select="$ticket"/>
  900. </ticket>
  901. <language><xsl:value-of select="user/param[@name='productLocale']"/></language>
  902. <locale><xsl:value-of select="user/param[@name='contentLocale']"/></locale>
  903. <timezoneid><xsl:value-of select="user/param[@name='timeZoneID']"/></timezoneid>
  904. </messageattribute>
  905. <message>
  906. <xsl:choose>
  907. <xsl:when test="upfSearch">
  908. <xts:queryNode select="upfSearch/*"/>
  909. </xsl:when>
  910. <xsl:otherwise>
  911. <DescribeNewsbox xmlns="http://developer.cognos.com/schemas/upfront/">
  912. <Id>
  913. <xsl:choose>
  914. <xsl:when test="substring-after(env/param[@name='m_nbid'], '-') != ''">
  915. <xsl:value-of select="substring-after(key('env-param', 'm_nbid'), '-')"/>
  916. </xsl:when>
  917. <xsl:when test="$isPublicRootNavigation"><xts:queryValue select="/root/*[local-name()='system']/BaseNewsBoxId"/></xsl:when>
  918. <xsl:otherwise><xts:queryValue select="/root/*[local-name()='user']/PersonalNewsBoxID"/></xsl:otherwise>
  919. </xsl:choose>
  920. </Id>
  921. <Module name="base"/>
  922. <Module name="UpdateDate"/>
  923. <Module name="CreateDate"/>
  924. </DescribeNewsbox>
  925. </xsl:otherwise>
  926. </xsl:choose>
  927. </message>
  928. </command>
  929. </envelope>
  930. </xts:request>
  931. </root>
  932. </xts:transform>
  933. </upfContent>
  934. </xts:append>
  935. </xts:sequence>
  936. </xsl:if>
  937. </xsl:template>
  938. </xsl:stylesheet>