default_run_options.xslt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:xts="http://developer.cognos.com/schemas/xts/">
  9. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  10. <pf:variables/>
  11. <xsl:template match="/">
  12. <xts:sequence>
  13. <!-- add defaults for the parameters - which is not here but in perforce history now -->
  14. <xts:append select="/root/env">
  15. <!--xsl:if test="not(/root/env/param[@name='visited_run_options'])">
  16. <param name="visited_run_options">
  17. <xsl:text>true</xsl:text>
  18. </param>
  19. </xsl:if-->
  20. <!-- do we show the summary page? -->
  21. <param name="showSummary">
  22. <xsl:value-of select="/root/system/param[@name = 'defaultPortalPreferences']/pref[@name='runoptions']"/>
  23. </param>
  24. <xsl:variable name="save_as_name">
  25. <xts:string id="IDS_ACT_CUSTOM_OF">
  26. <xts:param name="curName">
  27. <xsl:value-of select="/root/env/param[@name='m_name']"/>
  28. </xts:param>
  29. </xts:string>
  30. </xsl:variable>
  31. <param name="m_ro_saveAsType">reportView</param>
  32. <param name="m_ro_saveAsName">
  33. <xsl:value-of select="normalize-space($save_as_name)"/>
  34. </param>
  35. <param name="m_ro_saveAsPath">
  36. <xsl:value-of select="'~/folder'"/>
  37. </param>
  38. <param name="save_how">report</param>
  39. <param name="m_ro_outputLocale">
  40. <xsl:value-of select="*/cm:executionLocale"/>
  41. </param>
  42. <param name="m_ro_prompt">
  43. <xsl:value-of select="*/cm:executionPrompt"/>
  44. </param>
  45. </xts:append>
  46. <xsl:variable name="defaultFormat">
  47. <xsl:choose>
  48. <xsl:when test="*/cm:executionFormat!=''">
  49. <xsl:choose>
  50. <xsl:when test="*/cm:executionFormat != 'XLS' or xtsext:cafaction('get_configsignedreporturls', '') != 'true'">
  51. <xsl:value-of select="*/cm:executionFormat"/>
  52. </xsl:when>
  53. <xsl:otherwise>
  54. <xsl:value-of select="'singleXLS'"/>
  55. </xsl:otherwise>
  56. </xsl:choose>
  57. </xsl:when>
  58. <xsl:otherwise>HTML</xsl:otherwise>
  59. </xsl:choose>
  60. </xsl:variable>
  61. <xsl:choose>
  62. <xsl:when test="contains($defaultFormat, 'HTML')">
  63. <param>
  64. <xsl:attribute name="name">m_ro_outputFormat_HTML</xsl:attribute>
  65. <xsl:value-of select="$defaultFormat"/>
  66. </param>
  67. <param name="m_ro_outputF_HTML_Type">true</param>
  68. </xsl:when>
  69. <xsl:when test="contains($defaultFormat, 'XLS')">
  70. <param>
  71. <xsl:attribute name="name">m_ro_outputFormat_XLS2000</xsl:attribute>
  72. <xsl:value-of select="$defaultFormat"/>
  73. </param>
  74. <param name="m_ro_outputF_XLS2000_Type">true</param>
  75. </xsl:when>
  76. <xsl:otherwise>
  77. <param>
  78. <xsl:attribute name="name">m_ro_outputFormat_<xsl:value-of select="$defaultFormat"/></xsl:attribute>
  79. <xsl:value-of select="$defaultFormat"/>
  80. </param>
  81. <xsl:if test="*/cm:executionPageOrientation!=''">
  82. <param name="m_ro_outputPageOrientation">
  83. <xsl:value-of select="*/cm:executionPageOrientation"/>
  84. </param>
  85. </xsl:if>
  86. <xsl:if test="*/cm:executionPageDefinition!=''">
  87. <param name="m_ro_outputPageDefinition">
  88. <xsl:value-of select="*/cm:executionPageDefinition/*/cm:searchPath"/>
  89. </param>
  90. </xsl:if>
  91. </xsl:otherwise>
  92. </xsl:choose>
  93. <!-- delete the genDefaults param -->
  94. <xts:delete select="/root/env/param[@name='genDefaults']" mandatory="false"/>
  95. </xts:sequence>
  96. </xsl:template>
  97. </xsl:stylesheet>