view-output.xts 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: Viewer
  5. (C) Copyright IBM Corp. 2001, 2011
  6. US Government Users Restricted Rights - Use, duplication or
  7. disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/viewer.xml, messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseCognosViewer">
  10. <xts:block id="parseURL" path="rv/logicsheets/parseURL.xslt" type="exec" processor="XSLT" mandatory="false"/>
  11. <xts:block id="redirect" type="exec" mode="output" processor="XSLT" dependency="parseURL" mimeType="text/html" contentId="redirect" partId="1" mandatory="false" nodelist="env, http">
  12. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl">
  13. <xsl:variable name="gateway" select="string(/root/http/param[@name='SCRIPT_NAME'])"/>
  14. <xsl:output method="html" encoding="utf-8" indent="no"/>
  15. <xsl:template match="/">
  16. <html>
  17. <head>
  18. <script language="javascript">
  19. function redirectToCognosViewerService()
  20. {
  21. var formWarpRequest = document.formWarpRequest;
  22. if(typeof formWarpRequest != "undefined" &amp;&amp; formWarpRequest != null)
  23. {
  24. formWarpRequest.submit();
  25. }
  26. }
  27. </script>
  28. </head>
  29. <body onload="redirectToCognosViewerService();">
  30. <form action="{$gateway}" name="formWarpRequest" id="formWarpRequest" method="post" style="height:100%;margin:0px">
  31. <xsl:for-each select="/root/env/param[@name != 'b_action' and @name != 'm']">
  32. <input type="hidden">
  33. <xsl:attribute name="name"><xsl:value-of select="./@name"/></xsl:attribute>
  34. <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
  35. </input>
  36. </xsl:for-each>
  37. <input type="hidden" name="b_action" value="cognosViewer"/>
  38. <!--Todo:take defaulting the output format out when the viewer service can handle determining default output format -->
  39. <input type="hidden" name="run.outputFormat" value="HTML"/>
  40. </form>
  41. </body>
  42. </html>
  43. </xsl:template>
  44. </xsl:stylesheet>
  45. </xts:block>
  46. <!-- Debug -->
  47. <xts:block id="debug" dependency="redirect" condition=".[ /root/session/param[@name='debug'] = '1' or /root/env/param[@name='ui.debug'] = 'true' ]"
  48. type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  49. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  50. <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="xsl dbg">
  51. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  52. <dbg:templates/>
  53. <xsl:template match="/">
  54. <dbg:dumpxml select="/root"/>
  55. </xsl:template>
  56. </xsl:stylesheet>
  57. </xts:block>
  58. </xts:morphlet>