banner-modal.xts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cpscrn
  5. (C) Copyright IBM Corp. 2005, 2011
  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 version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/">
  13. <!-- ======================================================== -->
  14. <!-- Session Management -->
  15. <!-- ======================================================== -->
  16. <xts:block id="createSystemElement" type="exec" processor="XSLT">
  17. <xsl:stylesheet version="1.0"
  18. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  19. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  20. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  21. exclude-result-prefixes="bus xtsext">
  22. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  23. <xsl:template match="/">
  24. <xts:sequence>
  25. <xts:append select="/root">
  26. <xts:request protocol="FILEREAD" cache="true" faultBlock="requestFault" target="/system.xml"/>
  27. <xts:request protocol="FILEREAD" cache="true" faultBlock="requestFault" target="/portal/system.xml"/>
  28. </xts:append>
  29. <xts:append>
  30. <generalConfigSettings>
  31. <xts:function name="getConfiguration">
  32. <xts:param name="portal.launchBusinessInsightChromeless"/>
  33. </xts:function>
  34. </generalConfigSettings>
  35. </xts:append>
  36. </xts:sequence>
  37. </xsl:template>
  38. </xsl:stylesheet>
  39. </xts:block>
  40. <!-- Handle errors which occur when reading the system XML file. Provide default values. -->
  41. <xts:block id="requestFault" type="fault" processor="XML" nodelist="">
  42. <system>
  43. <param name="delimiters" d1="|" d2=":"/>
  44. <param name="COGNOSHome">b_action=xts.run&amp;m=portal/main.xts</param>
  45. </system>
  46. </xts:block>
  47. <!-- Reads session-sensitive info from CM -->
  48. <xts:block processor="XSLT" type="exec" mandatory="false"
  49. id="refreshSession"
  50. path="portal/cc/read_session.xml"
  51. dependency="createSystemElement"
  52. condition=".[
  53. string(/root/cookies/cookie[@name = 'cc_session']) = ''
  54. or /root/env/param[@name='m_reload']
  55. or /root/env/param[@name='m_root'] ]">
  56. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  57. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  58. </xts:block>
  59. <!-- Update the <session> element for this request. -->
  60. <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession" processor="XSLT" type="exec"
  61. condition=".[
  62. /root/newSession
  63. or /root/env/param[@name='ui']
  64. or /root/env/param[@name='d']
  65. or /root/env/param[starts-with(@name,'m_s_')]
  66. or /root/env/param[@name = 'resetSort'] ]"
  67. mandatory="false"/>
  68. <!-- Save changes to the state info in a cookie -->
  69. <xts:block mode="interpret" processor="XSLT" type="exec"
  70. id="setSession"
  71. path="portal/set_session.xml"
  72. dependency="buildSession"
  73. condition=".[/root/updateSession]"
  74. mandatory="false"/>
  75. <xts:block id="response" dependency="setSession" type="exec" mode="interpret" processor="XSLT" nodelist="env">
  76. <xts:logicsheet path="logicsheets/portal.xsl"/>
  77. <xsl:stylesheet version="1.0"
  78. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  79. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  80. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  81. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  82. exclude-result-prefixes="xos pf xtsext">
  83. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  84. <pf:modalVariables/>
  85. <xsl:template match="/">
  86. <xts:sequence>
  87. <xts:append select="/root/output">
  88. <xos:part xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
  89. <xos:entityHeader>
  90. <xos:param name="Content-Type">text/html</xos:param>
  91. </xos:entityHeader>
  92. <xos:entityBody>
  93. <html>
  94. <head>
  95. <meta http-equiv="expires" content="0"/>
  96. <title>Banner Authentication Redirect</title>
  97. </head>
  98. <script language="JavaScript">
  99. function init()
  100. {
  101. parent.<xsl:value-of select="$callBackFunctionName"/>('ok', null);
  102. }
  103. </script>
  104. <body bgcolor="#ffffff" onload="init();"/>
  105. </html>
  106. </xos:entityBody>
  107. </xos:part>
  108. </xts:append>
  109. </xts:sequence>
  110. </xsl:template>
  111. </xsl:stylesheet>
  112. </xts:block>
  113. </xts:morphlet>