search_pagers.xslt 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  15. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  16. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  17. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  18. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  19. xmlns:pg="http://developer.cognos.com/schemas/xts/pg"
  20. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  21. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  22. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  23. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  24. xmlns:out="dummy-uri"
  25. exclude-result-prefixes="xts xsl cp dp cf cm">
  26. <xsl:output method="xml" encoding="UTF-8" indent="no"/>
  27. <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
  28. <!-- This template renders UI for the basic search resultset -->
  29. <xsl:template match="pg:pager-basicSearch">
  30. <mf:long-description-scripts/>
  31. <cf:main-pager-section virtualPage="true" name="search" width="100%">
  32. <xsl:if test="@navContent='true'">
  33. <xsl:attribute name="navContent"><xsl:value-of select="'true'"/></xsl:attribute>
  34. </xsl:if>
  35. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  36. <cf:param name="lines-per-page">
  37. <out:value-of select="key('session-param', 'linesPerPage')"/>
  38. </cf:param>
  39. <xsl:choose>
  40. <xsl:when test="@navContent='true'">
  41. <cf:param name="item-path">/root/navContent/nav:searchResponse/nav:content/*</cf:param>
  42. </xsl:when>
  43. <xsl:otherwise>
  44. <cf:param name="item-path">$childReply/*[cm:usage != 'subObject']</cf:param>
  45. </xsl:otherwise>
  46. </xsl:choose>
  47. <cf:param name="rows">
  48. <cp:tableHeader session-name="s_cc">
  49. <xsl:if test = "not(@noSelection)">
  50. <cp:columnHeader width="16" toggleName="checkbox_" noLabel="true" id="checkbox_0"/>
  51. </xsl:if>
  52. <cp:columnHeader width="20"/>
  53. <cp:columnHeader width="20">
  54. <img height="5" width="1" border="0"><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
  55. <out:text/><xts:string id="IDS_PATH_INDICATOR"/><out:text></out:text>
  56. </cp:columnHeader>
  57. <cp:columnHeader width="100%" sort="n">
  58. <cp:sortHref>
  59. <out:value-of select="$back-url"/>&amp;m_s_cc=<out:text/>
  60. <out:choose>
  61. <out:when test="key('session-param','s_cc') = 'na'">nd</out:when>
  62. <out:when test="key('session-param','s_cc') = 'nd'">sa</out:when>
  63. <out:otherwise>na</out:otherwise>
  64. </out:choose>
  65. </cp:sortHref>
  66. <img height="5" width="1" border="0"><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
  67. <xts:string id="IDS_NAME"/>
  68. </cp:columnHeader>
  69. <cp:columnHeader width="150">
  70. <xts:string id="IDS_HEADING_ACTIONS"/>
  71. </cp:columnHeader>
  72. </cp:tableHeader>
  73. <cp:tableContent>
  74. <cp:common-render-variables>
  75. <!-- Common variables used in rendering icons, actions .. etc. -->
  76. <pm:permissions/>
  77. <mf:common-entry-varaibles/>
  78. </cp:common-render-variables>
  79. <xsl:if test = "not(@noSelection)">
  80. <cp:columnContent valign="top">
  81. <out:variable name="checkboxLabel"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM" encode="html"><xts:param name="pagerItemName"><out:value-of select="cm:defaultName"/></xts:param></xts:string></out:variable>
  82. <input type="checkbox" value="{'{xtsext:urlencode(string(cm:searchPath))}'}" name="checkbox_{'{position()}'}" id="checkbox_{'{position()}'}" aria-label="{'{$checkboxLabel}'}" >
  83. <out:if test="key('env-param',concat('checkbox_' , position()))">
  84. <out:attribute name="checked">checked</out:attribute>
  85. </out:if>
  86. </input>
  87. </cp:columnContent>
  88. </xsl:if>
  89. <cp:columnContent valign="top" style="padding-top:6px;">
  90. <xsl:choose>
  91. <xsl:when test="@navContent='true'">
  92. <out:call-template name="ccinav-gen-icon">
  93. <out:with-param name="imgURL" select="nav:imgURL"/>
  94. <out:with-param name="screenTip" select="nav:screenTip"/>
  95. <out:with-param name="defaultAction" select="nav:defaultAction/nav:imgURL"/>
  96. <out:with-param name="hiddenObject" select="nav:hidden"/>
  97. </out:call-template>
  98. </xsl:when>
  99. <xsl:otherwise>
  100. <out:call-template name="gen-icon">
  101. <out:with-param name="class" select="$class"/>
  102. <out:with-param name="userInterfaces" select="$userInterfaces"/>
  103. <out:with-param name="canRead" select="$canRead"/>
  104. <out:with-param name="canWrite" select="$canWrite"/>
  105. <out:with-param name="canExecute" select="$canExecute"/>
  106. <out:with-param name="canTraverse" select="$canTraverse"/>
  107. <out:with-param name="isDangling" select="$isDangling"/>
  108. <out:with-param name="output_format" select="$output_format"/>
  109. <out:with-param name="action" select="$action"/>
  110. <out:with-param name="executionFormat" select="$executionFormat"/>
  111. <out:with-param name="hiddenObject" select="$hiddenObject"/>
  112. <out:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  113. </out:call-template>
  114. </xsl:otherwise>
  115. </xsl:choose>
  116. </cp:columnContent>
  117. <cp:columnContent valign="top" nowrap="true">
  118. <div tabindex="0">
  119. <img width="20" height="16" align="absmiddle" src="{'{$skin_images}'}path.gif">
  120. <out:attribute name="alt">
  121. <xsl:choose>
  122. <xsl:when test="@navContent='true'">
  123. <out:call-template name="do-the-path-link-nav">
  124. <out:with-param name="path" select="nav:fullPath/nav:pathStep/nav:pathStep"></out:with-param>
  125. <out:with-param name="name" select="nav:name"></out:with-param>
  126. </out:call-template>
  127. </xsl:when>
  128. <xsl:otherwise>
  129. <out:variable name="object-start-at-path">
  130. <out:if test="starts-with(cm:searchPath, '~') or starts-with(cm:searchPath,key('session-param', 'e_hp'))">
  131. <out:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
  132. </out:if>
  133. <out:if test="starts-with(cm:searchPath,'/content')">
  134. <out:value-of select="$defaultContentRoot"/>
  135. </out:if>
  136. </out:variable>
  137. <cf:do-the-path-link>
  138. <cf:param name="familytree">cm:ancestors</cf:param>
  139. <cf:param name="familymember">cm:defaultName</cf:param>
  140. <cf:param name="home"><out:value-of select="$object-start-at-path"/></cf:param>
  141. <cf:param name="onlyAncestors">true</cf:param>
  142. </cf:do-the-path-link>
  143. </xsl:otherwise>
  144. </xsl:choose>
  145. </out:attribute>
  146. </img><xsl:text>&#160;</xsl:text>
  147. </div>
  148. </cp:columnContent>
  149. <cp:columnContent valign="top" wrap="true" width="100%">
  150. <div>
  151. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  152. <xsl:choose>
  153. <xsl:when test="@navContent='true'">
  154. <out:call-template name="ccinav-gen-url"></out:call-template>
  155. </xsl:when>
  156. <xsl:otherwise>
  157. <mf:entry-name mode="search"/>
  158. </xsl:otherwise>
  159. </xsl:choose>
  160. </div>
  161. <div>
  162. <out:text/><xts:string id="IDS_SEARCH_LAST_MODIFIED_TEXT"/><out:text/>
  163. <xsl:choose>
  164. <xsl:when test="@navContent='true'">
  165. <out:value-of select="string( nav:lastModifiedDate )"/>
  166. </xsl:when>
  167. <xsl:otherwise>
  168. <out:value-of select="xtsext:formatDateFromUTC( string( cm:modificationTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
  169. </xsl:otherwise>
  170. </xsl:choose>
  171. </div>
  172. <mf:long-description/>
  173. </cp:columnContent>
  174. <cp:columnContent valign="top">
  175. <xsl:choose>
  176. <xsl:when test="@navContent='true'">
  177. <out:call-template name="ccinav-gen-action-properties"/>
  178. </xsl:when>
  179. <xsl:otherwise>
  180. <out:call-template name="action-properties">
  181. <out:with-param name="supportRunOptionsAction" select="true()"/>
  182. <out:with-param name="supportScheduleAction" select="true()"/>
  183. <out:with-param name="canRead" select="$canRead"/>
  184. <out:with-param name="canWrite" select="$canWrite"/>
  185. <out:with-param name="canExecute" select="$canExecute"/>
  186. <out:with-param name="canTraverse" select="$canTraverse"/>
  187. <out:with-param name="class" select="$class"/>
  188. <out:with-param name="userInterfaces" select="$userInterfaces"/>
  189. <out:with-param name="output_format" select="$output_format"/>
  190. <out:with-param name="isDangling" select="$isDangling"/>
  191. <out:with-param name="effectiveUserCapabilities" select="$effectiveUserCapabilities"/>
  192. </out:call-template>
  193. </xsl:otherwise>
  194. </xsl:choose>
  195. </cp:columnContent>
  196. </cp:tableContent>
  197. </cf:param>
  198. </cf:main-pager-section>
  199. </xsl:template>
  200. <!-- This template renders UI for the index (Burgundy) search resultset -->
  201. <xsl:template match="pg:pager-indexSearch">
  202. <script language="javascript">
  203. <out:variable name="icon-expand">
  204. <out:value-of select="xtsext:javascriptencode($skin_images)"/>prompt_option_expand.gif<out:text/>
  205. </out:variable>
  206. <out:variable name="icon-collapse">
  207. <out:value-of select="xtsext:javascriptencode($skin_images)"/>prompt_option_collapse.gif<out:text/>
  208. </out:variable>
  209. function expandMatch(id) {
  210. var match = document.getElementById(id + "match");
  211. if (match != null) {
  212. match.style.overflow = 'visible';
  213. match.style.height = 'auto';
  214. match.style.lineHeight = 'normal';
  215. match.style.display = "";
  216. }
  217. var icon = document.getElementById(id + "srcharw");
  218. if (icon != null) {
  219. icon.src ="<out:value-of select="$icon-collapse"/>";
  220. }
  221. }
  222. function collapseMatch(id) {
  223. var match = document.getElementById(id + "match");
  224. if (match != null) {
  225. match.style.display = "none";
  226. }
  227. var icon = document.getElementById(id + "srcharw");
  228. if (icon != null) {
  229. icon.src ="<out:value-of select="$icon-expand"/>";
  230. }
  231. }
  232. function toggleMatch(id) {
  233. var match = document.getElementById(id + "match");
  234. if (match.style.overflow == 'hidden') {
  235. expandMatch(id);
  236. }
  237. else {
  238. collapseMatch(id);
  239. }
  240. }
  241. var desc_expanded =
  242. <out:choose>
  243. <out:when test="string(/root/env/param[@name='desc_expanded']) = 'false'">
  244. <out:value-of select="'false'"/>
  245. </out:when>
  246. <out:otherwise>
  247. <out:value-of select="'true'"/>
  248. </out:otherwise>
  249. </out:choose>
  250. ;
  251. function toggleMatchAll(count) {
  252. var icon = document.getElementById("srcharwall");
  253. if (!desc_expanded) {
  254. icon.title = '<xts:string id="IDS_SEARCH_COLLAPSE_DETAILS" encode="javascript"/>';
  255. desc_expanded = true;
  256. icon.src = "<out:value-of select="$icon-collapse"/>";
  257. if (count > 0) {
  258. for (i = 1; i &lt;= count; i++) {
  259. expandMatch ("" + i);
  260. }
  261. }
  262. }
  263. else {
  264. icon.title = '<xts:string id="IDS_SEARCH_EXPAND_DETAILS" encode="javascript"/>';
  265. desc_expanded = false;
  266. icon.src = "<out:value-of select="$icon-expand"/>";
  267. if (count > 0) {
  268. for (i = 1; i &lt;= count; i++) {
  269. collapseMatch("" + i);
  270. }
  271. }
  272. }
  273. if (document.frmSearch["desc_expanded"]) {
  274. document.frmSearch["desc_expanded"].value = desc_expanded;
  275. }
  276. }
  277. </script>
  278. <cf:main-pager-section virtualPage="true" form="frmSearch" navContent="true" name="search" width="100%">
  279. <xsl:copy-of select="@*"/>
  280. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  281. <cf:param name="item-path">/root/navContent/nav:searchResponse/nav:content/*</cf:param>
  282. <cf:param name="lines-per-page">
  283. <out:value-of select="key('session-param', 'linesPerPage')"/>
  284. </cf:param>
  285. <cf:param name="noGoto">true</cf:param>
  286. <cf:param name="navContext"><out:value-of select="{'/root/navContent/nav:searchResponse/nav:context'}"/></cf:param>
  287. <cf:param name="navApproximateMaxEntries"><out:value-of select="{'/root/navContent/nav:searchResponse/nav:content/@estimatedTotal'}"/></cf:param>
  288. <cf:param name="rows">
  289. <cp:tableHeader>
  290. <xsl:if test = "not(@noSelection)">
  291. <cp:columnHeader width="16" toggleName="checkbox_"/>
  292. </xsl:if>
  293. <cp:columnHeader width="20"/>
  294. <cp:columnHeader width="100%" noSep="T">
  295. <img height="5" width="1" border="0"><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
  296. <out:text/><xts:string id="IDS_PATH_INDICATOR"/><out:text>&#160;</out:text>
  297. <img height="5" width="1" border="0"><out:attribute name="src"><out:value-of select="$webcontent"/>/images/space.gif</out:attribute></img>
  298. <xts:string id="IDS_NAME"/>
  299. <out:if test="count(/root/navContent/nav:searchResponse/nav:content/*) > 0">
  300. <a href="javascript:toggleMatchAll({'{count(/root/navContent/nav:searchResponse/nav:content/*)}'})">
  301. <img id="srcharwall" hspace="2" border="0">
  302. <out:choose>
  303. <out:when test="string(/root/env/param[@name='desc_expanded']) = 'false'">
  304. <out:attribute name="src"><out:value-of select="$skin_images"/>prompt_option_expand.gif<out:text/></out:attribute>
  305. <out:attribute name="title"><out:text/><xts:string id="IDS_SEARCH_EXPAND_DETAILS"/></out:attribute>
  306. <out:attribute name="alt"><out:text/><xts:string id="IDS_SEARCH_EXPAND_DETAILS"/></out:attribute>
  307. </out:when>
  308. <out:otherwise>
  309. <out:attribute name="src"><out:value-of select="$skin_images"/>prompt_option_collapse.gif<out:text/></out:attribute>
  310. <out:attribute name="title"><out:text/><xts:string id="IDS_SEARCH_COLLAPSE_DETAILS"/></out:attribute>
  311. <out:attribute name="alt"><out:text/><xts:string id="IDS_SEARCH_COLLAPSE_DETAILS"/></out:attribute>
  312. </out:otherwise>
  313. </out:choose>
  314. </img>
  315. </a>
  316. </out:if>
  317. </cp:columnHeader>
  318. <cp:columnHeader width="1">
  319. </cp:columnHeader>
  320. <cp:columnHeader width="150">
  321. <xts:string id="IDS_HEADING_ACTIONS"/>
  322. </cp:columnHeader>
  323. </cp:tableHeader>
  324. <cp:tableContent>
  325. <cp:common-render-variables>
  326. <!-- Common variables used in rendering icons, actions .. etc. -->
  327. <pm:permissions/>
  328. <mf:common-entry-varaibles/>
  329. </cp:common-render-variables>
  330. <xsl:if test = "not(@noSelection)">
  331. <cp:columnContent valign="top">
  332. <out:if test="string(nav:type) != ''">
  333. <out:variable name="obj-id">
  334. <out:text/>storeID("<out:value-of select="substring-after(string(nav:id), '_')"/>")<out:text/>
  335. </out:variable>
  336. <input type="checkbox" name="checkbox_{'{position()}'}" value="{'{$obj-id}'}">
  337. <out:if test="key('env-param',concat('checkbox_' , position()))">
  338. <out:attribute name="checked">checked</out:attribute>
  339. </out:if>
  340. </input>
  341. </out:if>
  342. </cp:columnContent>
  343. </xsl:if>
  344. <cp:columnContent valign="top" style="padding-top:6px;">
  345. <out:call-template name="ccinav-gen-icon">
  346. <out:with-param name="imgURL" select="nav:imgURL"/>
  347. <out:with-param name="screenTip" select="nav:screenTip"/>
  348. <out:with-param name="defaultAction" select="nav:defaultAction/nav:imgURL"/>
  349. <out:with-param name="hiddenObject" select="nav:hidden"/>
  350. </out:call-template>
  351. </cp:columnContent>
  352. <cp:columnContent valign="top">
  353. <div>
  354. <img width="20" height="16" align="absmiddle" src="{'{$skin_images}'}path.gif">
  355. <out:attribute name="alt">
  356. <out:call-template name="do-the-path-link-nav">
  357. <out:with-param name="path" select="nav:fullPath/nav:pathStep/nav:pathStep"></out:with-param>
  358. <out:with-param name="name" select="nav:name"></out:with-param>
  359. </out:call-template>
  360. </out:attribute>
  361. </img><xsl:text>&#160;</xsl:text>
  362. <!-- Logic to figure out if an entry is to be hyperlinked and if it is what the URL should be -->
  363. <out:call-template name="ccinav-gen-url"></out:call-template>
  364. </div>
  365. <out:variable name="display">
  366. <out:choose>
  367. <out:when test="string(/root/env/param[@name='desc_expanded']) = 'false'">
  368. <out:value-of select="'none'"/>
  369. </out:when>
  370. <out:otherwise>
  371. <out:value-of select="''"/>
  372. </out:otherwise>
  373. </out:choose>
  374. </out:variable>
  375. <div id="{'{position()}'}match">
  376. <out:attribute name="style">display:<out:value-of select="$display"/></out:attribute>
  377. <table border="0" cellpadding="0" cellspacing="0">
  378. <tr>
  379. <td style="padding-left:24px" class="objectOptions">
  380. <out:if test="nav:matchDescription != ''">
  381. <out:value-of disable-output-escaping="yes" select="nav:matchDescription"/>
  382. </out:if>
  383. </td>
  384. </tr>
  385. </table>
  386. </div>
  387. </cp:columnContent>
  388. <cp:columnContent valign="top" align="right">
  389. <out:if test="nav:score != '' and nav:score != 'null' ">
  390. <out:value-of select="nav:score"/>%<out:text/>
  391. <out:text>&#160;</out:text>
  392. <img src="{'{nav:icon[nav:name=&quot;score&quot;]/nav:imgURL}'}">
  393. <out:attribute name="title">
  394. <xts:string id="IDS_SEARCH_TOOLTIP_RELEVANCE">
  395. <xts:param name="score"><out:value-of select="nav:score"/></xts:param>
  396. </xts:string>
  397. </out:attribute>
  398. <out:attribute name="alt">
  399. <xts:string id="IDS_SEARCH_TOOLTIP_RELEVANCE">
  400. <xts:param name="score"><out:value-of select="nav:score"/></xts:param>
  401. </xts:string>
  402. </out:attribute>
  403. </img>
  404. </out:if>
  405. </cp:columnContent>
  406. <cp:columnContent valign="top">
  407. <out:call-template name="ccinav-gen-action-properties">
  408. </out:call-template>
  409. </cp:columnContent>
  410. </cp:tableContent>
  411. </cf:param>
  412. </cf:main-pager-section>
  413. </xsl:template>
  414. <xsl:template match="pg:do-the-path-link-nav">
  415. <out:template name="do-the-path-link-nav">
  416. <out:param name="path" select="''"/>
  417. <out:param name="name" select="''"/>
  418. <out:value-of select="$path/nav:name"/>
  419. <out:choose>
  420. <out:when test="$path/nav:pathStep">
  421. <out:text/>&#160;&gt;&#160;<out:text/>
  422. <out:call-template name="do-the-path-link-nav">
  423. <out:with-param name="path" select="$path/nav:pathStep"></out:with-param>
  424. <out:with-param name="name" select="$name"/>
  425. </out:call-template>
  426. </out:when>
  427. <out:otherwise>
  428. <out:text/>&#160;&gt;&#160;<out:text/>
  429. <out:value-of select="$name"/>
  430. </out:otherwise>
  431. </out:choose>
  432. </out:template>
  433. </xsl:template>
  434. <xsl:template match="pg:store_cs_filter">
  435. <xts:append>
  436. <xts:function name="TDSRequest">
  437. <xts:param name="action">set</xts:param>
  438. <xts:param name="session-id"><out:value-of select="$passport"/></xts:param>
  439. <xts:param name="name"><out:value-of select="'index_search_context'"/></xts:param>
  440. <xts:param name="source">
  441. <out:value-of select="{./pg:cs_filter}"/>
  442. </xts:param>
  443. </xts:function>
  444. </xts:append>
  445. </xsl:template>
  446. <xsl:template match="pg:read_cs_filter">
  447. <!-- consult with the runtime session storage iff we don't already have a filter -->
  448. <out:if test="not(/root/env/param[@name='cs_filter']) and string(/root/env/param[@name='t_cs_filter_saved']) = 'true'">
  449. <xts:append>
  450. <index_search_context>
  451. <xts:function name="TDSRequest">
  452. <xts:param name="action">get</xts:param>
  453. <xts:param name="session-id"><out:value-of select="$passport"/></xts:param>
  454. <xts:param name="name"><out:value-of select="'index_search_context'"/></xts:param>
  455. </xts:function>
  456. </index_search_context>
  457. </xts:append>
  458. <xts:append select="/root/env">
  459. <param name="cs_filter">
  460. <xts:transform xmlns:xts="http://developer.cognos.com/schemas/xts/" name="XMLEncode">
  461. <xts:queryValue select="/root/*[local-name()= 'index_search_context']"/>
  462. </xts:transform>
  463. </param>
  464. </xts:append>
  465. <xts:delete select="/root/index_search_context"/>
  466. </out:if>
  467. </xsl:template>
  468. <!-- The main engine -->
  469. <xsl:template match="*">
  470. <xsl:copy>
  471. <xsl:copy-of select="@*"/>
  472. <xsl:apply-templates/>
  473. </xsl:copy>
  474. </xsl:template>
  475. </xsl:stylesheet>