command_blocks.xml 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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, 2017
  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. Generated Runtime configuration tool UI file (English).
  15. ===============================================================================================
  16. -->
  17. <xsl:stylesheet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  18. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  19. <xsl:template match="/">
  20. <xts:sequence>
  21. <xts:append>
  22. <xsl:variable name="connectionType" select="/root/env/param[@name='m_connection_type']"/>
  23. <xsl:if test="not($connectionType) or /root/datasources/datasource[value=$connectionType]/supportsCommandBlocks = 'true'">
  24. <xts:transform src="transforms/portal/dataSource/processCommandBlocks.xslt" processor="XSLT">
  25. <input>
  26. <currentCommands>
  27. <!-- need to find out where cm queryReply is. -->
  28. <xsl:choose>
  29. <!-- property connection dialog -->
  30. <xsl:when test="/root/connection/*[local-name()='queryResponse']/*[local-name()='dataSourceConnection']//*[local-name()='openConnectionCommands' or local-name()='openSessionCommands' or local-name()='closeConnectionCommands' or local-name()='closeSessionCommands' ]">
  31. <xsl:copy-of select="/root/connection/*[local-name()='queryResponse']/*[local-name()='dataSourceConnection']/*"/>
  32. </xsl:when>
  33. <xsl:when test="/root/dataSource/*[local-name()='queryResponse']/*[local-name()='dataSource']//*[local-name()='openConnectionCommands' or local-name()='openSessionCommands' or local-name()='closeConnectionCommands' or local-name()='closeSessionCommands' ]">
  34. <xsl:copy-of select="/root/dataSource/*[local-name()='queryResponse']/*[local-name()='dataSource']/*"/>
  35. </xsl:when>
  36. </xsl:choose>
  37. </currentCommands>
  38. <parentCommands>
  39. <!-- need to find out where cm queryReply is. -->
  40. <xsl:choose>
  41. <!-- new dataSource/dataSourceConnection wizard -->
  42. <xsl:when test="/root/parentDataSource/*[local-name()='queryResponse']/*[local-name()='dataSource']//*[local-name()='openConnectionCommands' or local-name()='openSessionCommands' or local-name()='closeConnectionCommands' or local-name()='closeSessionCommands' ]">
  43. <xsl:copy-of select="/root/parentDataSource/*[local-name()='queryResponse']/*[local-name()='dataSource']/*"/>
  44. </xsl:when>
  45. <!-- property connection dialog -->
  46. <xsl:when test="/root/connection/*[local-name()='queryResponse']/*[local-name()='dataSourceConnection']/*[local-name()='parent']/*[local-name()='dataSource']//*[local-name()='openConnectionCommands' or local-name()='openSessionCommands' or local-name()='closeConnectionCommands' or local-name()='closeSessionCommands' ]">
  47. <xsl:copy-of select="/root/connection/*[local-name()='queryResponse']/*[local-name()='dataSourceConnection']/*[local-name()='parent']/*[local-name()='dataSource']/*"/>
  48. </xsl:when>
  49. </xsl:choose>
  50. </parentCommands>
  51. <env>
  52. <xsl:copy-of select="/root/env/*"/>
  53. </env>
  54. <commandBlocks>
  55. <command>
  56. <propertyName>openConnectionCommands</propertyName>
  57. <displayString><xsl:text><xts:string id="IDS_PROP_CONN_OPEN_CONNECTION_COMMAND"/></xsl:text></displayString>
  58. </command>
  59. <command>
  60. <propertyName>openSessionCommands</propertyName>
  61. <displayString><xsl:text><xts:string id="IDS_PROP_CONN_OPEN_SESSION_COMMAND"/></xsl:text></displayString>
  62. </command>
  63. <command>
  64. <propertyName>closeSessionCommands</propertyName>
  65. <displayString><xsl:text><xts:string id="IDS_PROP_CONN_CLOSE_SESSION_COMMAND"/></xsl:text></displayString>
  66. </command>
  67. <command>
  68. <propertyName>closeConnectionCommands</propertyName>
  69. <displayString><xsl:text><xts:string id="IDS_PROP_CONN_CLOSE_CONNECTION_COMMAND"/></xsl:text></displayString>
  70. </command>
  71. </commandBlocks>
  72. </input>
  73. </xts:transform>
  74. </xsl:if>
  75. </xts:append>
  76. <!-- cleanup the env, should always do this even when we're not dealing with an oracle connection -->
  77. <xts:delete select="/root/env/param[starts-with(@name,'m_display_cbp_') or starts-with(@name,'m_acquired_') or starts-with(@name,'list_checkbox_') or starts-with(@name,'m_cbp_') or starts-with(@name,'changed_m_cbp_')]"/>
  78. </xts:sequence>
  79. </xsl:template>
  80. </xsl:stylesheet>