select.xts 25 KB

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