pp8save.xts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <!--
  13. *******************************************************************
  14. *******************************************************************
  15. *******************************************************************
  16. *******************************************************************
  17. THIS IS THE SAVE MORPHLET FOR
  18. POWERPLAY WEB INTEGRATION
  19. INTO COGNOS CONNECTION.
  20. *******************************************************************
  21. *******************************************************************
  22. *******************************************************************
  23. *******************************************************************
  24. -->
  25. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
  26. <!--
  27. This morphlet (save_as.xts) consists of the following blocks:
  28. renderPage - render the Save page when saving a powerPlay 8 report.
  29. redirect
  30. -->
  31. <xts:block id="ppwSave" processor="XSLT" type="exec">
  32. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  33. <xts:logicsheet path="logicsheets/portal.xsl"/>
  34. <xsl:stylesheet version="1.0"
  35. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  36. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  37. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  38. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  39. xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/"
  40. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  41. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="cms xts send cm pf xtsext">
  42. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  43. <pf:variables/> <!-- global application variables -->
  44. <xsl:template match="/">
  45. <xsl:apply-templates select="/root/env"/>
  46. </xsl:template>
  47. <xsl:template match="env">
  48. <!-- this is the class of the new object -->
  49. <xsl:variable name="cls" select="param[@name='m_class']"/>
  50. <xts:sequence>
  51. <!-- prepare and send the add request -->
  52. <xts:append>
  53. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  54. <send:request provider="cm">
  55. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  56. <cm:update xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  57. <cm:objects>
  58. <xsl:element name="cm:{$cls}" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
  59. <cm:searchPath><xsl:value-of select="param[@name='m_obj']"/></cm:searchPath>
  60. <xsl:if test="string(param[@name='m_class'])='powerPlay8Report'">
  61. <xsl:if test="param[string(@name)='m_pp8properties']">
  62. <xsl:value-of select="param[string(@name)='m_pp8properties']" disable-output-escaping="yes"/>
  63. </xsl:if>
  64. </xsl:if>
  65. </xsl:element>
  66. </cm:objects>
  67. </cm:update>
  68. </xts:transform>
  69. </send:request>
  70. </xts:transform>
  71. </xts:append>
  72. </xts:sequence>
  73. </xsl:template>
  74. </xsl:stylesheet>
  75. </xts:block>
  76. <!--
  77. ===============================================================================================
  78. redirect - redirect the browser
  79. ===============================================================================================
  80. -->
  81. <xts:block id="redirect" dependency="ppwSave" mode="output" processor="XSLT" type="exec" mimeType="text/html">
  82. <xts:logicsheet path="logicsheets/portal.xsl"/>
  83. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  84. <xsl:stylesheet version="1.0"
  85. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  86. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  87. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  88. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  89. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  90. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  91. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  92. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  93. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  94. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  95. exclude-result-prefixes="xsl pf dp utml xtsext cp bus cm cml xts">
  96. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  97. <pf:variables/>
  98. <xsl:template match="/">
  99. <xsl:variable name="ppURL">
  100. <xsl:value-of select="concat(string(/root/env/param[@name='successURL']),'&amp;crnobj=',xtsext:urlencode(string(/root/env/param[@name='m_obj'])))"/>
  101. </xsl:variable>
  102. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$product_name">
  103. <dp:meta>
  104. <pf:meta/> <!-- Add standard meta tags -->
  105. </dp:meta>
  106. <form name="pform" method="post" action="{$gateway}">
  107. <input name="doPostURL" value="successURL" type="hidden"/>
  108. <input name="m" type="hidden" value="portal/postURL.xts"/>
  109. <input name="successURL" type="hidden">
  110. <xsl:attribute name="value"><xsl:value-of select="$ppURL"/></xsl:attribute>
  111. </input>
  112. </form>
  113. <script language="javascript">document.pform.submit();</script>
  114. </dp:page>
  115. </xsl:template>
  116. </xsl:stylesheet>
  117. </xts:block>
  118. </xts:morphlet>