back.xts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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, 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 xmlns:xts="http://developer.cognos.com/schemas/xts/">
  13. <xts:block id="readSession" processor="XSLT" type="exec" mode="interpret" mandatory="false"
  14. nodelist="http, env, cookies, header">
  15. <xts:logicsheet path="logicsheets/portal.xsl"/>
  16. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  17. <xsl:stylesheet version="1.0"
  18. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  19. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  20. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  21. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  22. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  23. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  24. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  25. xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
  26. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  27. <xsl:variable name="back-id" select="/root/env/param[@name = 'id']"/>
  28. <pf:sessionpassport/>
  29. <xsl:template match="/">
  30. <xsl:if test="$back-id != ''">
  31. <xts:sequence>
  32. <xts:append>
  33. <backSession>
  34. <xts:function name="TDSRequest">
  35. <xts:param name="action">get</xts:param>
  36. <xts:param name="session-id"><xsl:value-of select="$passport"/></xts:param>
  37. <xts:param name="map-id"><xsl:value-of select="'portlets'"/></xts:param>
  38. <xts:param name="name"><xsl:value-of select="$back-id"/></xts:param>
  39. </xts:function>
  40. </backSession>
  41. </xts:append>
  42. <xts:discard>
  43. <xts:function name="TDSRequest">
  44. <xts:param name="action">delete</xts:param>
  45. <xts:param name="session-id"><xsl:value-of select="$passport"/></xts:param>
  46. <xts:param name="map-id"><xsl:value-of select="'portlets'"/></xts:param>
  47. <xts:param name="name"><xsl:value-of select="$back-id"/></xts:param>
  48. </xts:function>
  49. </xts:discard>
  50. </xts:sequence>
  51. </xsl:if>
  52. </xsl:template>
  53. </xsl:stylesheet>
  54. </xts:block>
  55. <xts:block id="response" dependency="readSession" type="exec" mode="interpret" processor="XSLT"
  56. nodelist="backSession">
  57. <xsl:stylesheet version="1.0"
  58. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  59. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  60. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  61. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  62. exclude-result-prefixes="cm xos xtsext">
  63. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  64. <xsl:variable name="back-url">
  65. <xsl:choose>
  66. <xsl:when test="/root/backSession/backURL != ''">
  67. <xsl:value-of select="/root/backSession/backURL"/>
  68. </xsl:when>
  69. <xsl:otherwise>
  70. <xsl:value-of select="string(/root/http/param[@name='SCRIPT_NAME'])"/>
  71. <xsl:text>?b_action=xts.run&amp;m=portal/main.xts</xsl:text>
  72. </xsl:otherwise>
  73. </xsl:choose>
  74. </xsl:variable>
  75. <xsl:template match="/">
  76. <xts:sequence>
  77. <xts:append select="/root/output">
  78. <xos:part xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
  79. <xos:entityHeader>
  80. <xos:param name="Content-Type">text/html</xos:param>
  81. </xos:entityHeader>
  82. <xos:entityBody>
  83. <html>
  84. <head>
  85. <meta http-equiv="refresh">
  86. <xsl:attribute name="content">0; URL=<xsl:value-of select="$back-url"/></xsl:attribute>
  87. </meta>
  88. <title>CPS Redirect</title>
  89. </head>
  90. <body bgcolor="#ffffff"/>
  91. </html>
  92. </xos:entityBody>
  93. </xos:part>
  94. </xts:append>
  95. </xts:sequence>
  96. </xsl:template>
  97. </xsl:stylesheet>
  98. </xts:block>
  99. </xts:morphlet>