tail.xslt 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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, 2013
  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. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  13. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  14. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  15. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  16. exclude-result-prefixes="xsl pf xtsext xts">
  17. <xsl:output method="html" encoding="utf-8" indent="no"/>
  18. <pf:variables/>
  19. <xsl:template match="/root">
  20. <!-- hidden inputs needed for a stack down -->
  21. <xsl:if test="/root/env/param[starts-with(@name,'stack_')] != ''">
  22. <input type="hidden" name="ps_nav_op" value=""/>
  23. <xsl:for-each select="/root/env/param[starts-with(@name, 'stack_')]">
  24. <input type="hidden" name="{@name}" value="{.}"/>
  25. </xsl:for-each>
  26. </xsl:if>
  27. <xsl:choose>
  28. <xsl:when test="key('env-param', 'visited_run_options_property')">
  29. <input type="hidden" name="visited_run_options_property">
  30. <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'visited_run_options_property')"/></xsl:attribute>
  31. </input>
  32. </xsl:when>
  33. <xsl:when test="key('env-param', 'step_options_visited')">
  34. <input type="hidden" name="step_options_called" value="{/root/command/*/redirect}"/>
  35. </xsl:when>
  36. <xsl:otherwise>
  37. <input type="hidden" name="backURL">
  38. <xsl:attribute name="value"><xsl:value-of select="key('env-param', 'backURL')"/></xsl:attribute>
  39. </input>
  40. </xsl:otherwise>
  41. </xsl:choose>
  42. <!-- round-trip the dispatcher tracking info -->
  43. <input type="hidden" name="m_tracking">
  44. <xsl:attribute name="value">
  45. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), string(/root/encodedTracking))"/>
  46. </xsl:attribute>
  47. </input>
  48. <!-- pack up the UIconversation to be used in any secondary requests -->
  49. <xsl:if test="/root/encodedUIConversation">
  50. <input type="hidden" name="ui.conversation">
  51. <xsl:attribute name="value">
  52. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), string(/root/encodedUIConversation))"/>
  53. </xsl:attribute>
  54. </input>
  55. </xsl:if>
  56. <!-- pack up the conversation to be used in any secondary requests -->
  57. <input type="hidden" name="web64conversation">
  58. <xsl:attribute name="value">
  59. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), string(/root/encodedConversation))"/>
  60. </xsl:attribute>
  61. </input>
  62. <input type="hidden" name="m" value="{key('env-param', 'm')}"/>
  63. <input type="hidden" name="errURL">
  64. <xsl:attribute name="value"><xsl:value-of select="key('env-param','backURL')"/></xsl:attribute>
  65. </input>
  66. <input type="hidden" name="b_action" value="xts.run"/>
  67. <input type="hidden" name="ui.routingServerGroup">
  68. <xsl:choose>
  69. <xsl:when test="key('env-param','routingServerGroup')">
  70. <xsl:attribute name="value"><xsl:value-of select="key('env-param','routingServerGroup')"/></xsl:attribute>
  71. </xsl:when>
  72. <xsl:otherwise>
  73. <xsl:attribute name="value"><xsl:value-of select="string(key('env-param','ui.routingServerGroup'))"/></xsl:attribute>
  74. </xsl:otherwise>
  75. </xsl:choose>
  76. </input>
  77. <input type="hidden" name="method"/>
  78. <xsl:if test="/root/command/*/addToPromptingEnv">
  79. <xsl:for-each select="/root/command/*/addToPromptingEnv/*">
  80. <input type="hidden" name="{@name}" value="{string(.)}"/>
  81. </xsl:for-each>
  82. </xsl:if>
  83. <!-- These next two are required for prompting -->
  84. <input type="hidden" name="_promptControl"/>
  85. <input type="hidden" name="prompt"/>
  86. <!-- Remember any info from the calling page -->
  87. <xsl:variable name="adminState">
  88. <xsl:choose>
  89. <xsl:when test="key('env-param', 'adminState')">
  90. <xsl:value-of select="key('env-param', 'adminState')"/>
  91. </xsl:when>
  92. <xsl:otherwise>
  93. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), string(/root/encodedAdminState))"/>
  94. </xsl:otherwise>
  95. </xsl:choose>
  96. </xsl:variable>
  97. <input type="hidden" name="adminState" value="{$adminState}"/>
  98. <!-- need to keep track of the cafcontextid if we're in a studio -->
  99. <xsl:if test="key('env-param','cafcontextid') != ''">
  100. <input type="hidden" name="cafcontextid" value="{key('env-param','cafcontextid')}"/>
  101. </xsl:if>
  102. <xsl:if test="/root/encodedParameters">
  103. <input type="hidden" name="encodedParameters">
  104. <xsl:attribute name="value">
  105. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), string(/root/encodedParameters))"/>
  106. </xsl:attribute>
  107. </input>
  108. </xsl:if>
  109. <xsl:if test="/root/encodedRptSvcParam or key('env-param','encodedRptSvcParam')">
  110. <input type="hidden" name="encodedRptSvcParam">
  111. <xsl:attribute name="value">
  112. <xsl:choose>
  113. <xsl:when test="/root/encodedRptSvcParam">
  114. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), string(/root/encodedRptSvcParam))"/>
  115. </xsl:when>
  116. <xsl:otherwise>
  117. <xsl:value-of select="key('env-param','encodedRptSvcParam')"/>
  118. </xsl:otherwise>
  119. </xsl:choose>
  120. </xsl:attribute>
  121. </input>
  122. </xsl:if>
  123. </xsl:template>
  124. </xsl:stylesheet>