get_add_entries_response.xslt 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. <xsl:stylesheet version="1.0"
  13. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  14. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  15. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  16. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  17. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  18. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  19. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  20. exclude-result-prefixes="xsl dlgctrl xtsext dt pf xts send">
  21. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  22. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  23. <xsl:template match="/">
  24. <xts:sequence>
  25. <dlgctrl:processXTS2Response>
  26. <dlgctrl:stackName>add_entries</dlgctrl:stackName>
  27. <!-- deal with the markup returned -->
  28. <dlgctrl:mode match="markup">
  29. <xts:append select="/root/output">
  30. <xts:transform src="portal/controls/display_markup.xslt" processor="XSLT" option="part" mimeType="text/html">
  31. <xts:param name="logicsheet">/logicsheets/portal.xsl</xts:param>
  32. <xts:param name="logicsheet">/logicsheets/validation.xslt</xts:param>
  33. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  34. <xts:param name="messageBase">/messages/portalRL.xml</xts:param>
  35. <root>
  36. <xts:transform name="XMLDecode">
  37. <dlgctrl:morphletResponse/>
  38. </xts:transform>
  39. <xsl:copy-of select="/root/http"/>
  40. <xsl:copy-of select="/root/env"/>
  41. <xsl:copy-of select="/root/system"/>
  42. <xsl:copy-of select="/root/user"/>
  43. <formFields>
  44. <input type="hidden" name="m_name" value="{key('env-param','m_name')}"/>
  45. <input type="hidden" name="m_new_class" value="{key('env-param','m_new_class')}"/>
  46. <input type="hidden" name="m_path" value="{key('env-param','m_path')}"/>
  47. <input type="hidden" name="m" value="{key('env-param','m')}"/>
  48. <input type="hidden" name="b_action" value="xts.run"/>
  49. <xsl:if test="key('env-param','step_default_name') != ''">
  50. <input type="hidden" name="step_default_name" value="{key('env-param','step_default_name')}"/>
  51. </xsl:if>
  52. <xsl:if test="key('env-param', 'lang') != ''">
  53. <input type="hidden" name="lang" value="{key('env-param', 'lang')}"/>
  54. </xsl:if>
  55. <xsl:if test="key('env-param','cafcontextid') != ''">
  56. <input type="hidden" name="cafcontextid" value="{key('env-param','cafcontextid')}"/>
  57. </xsl:if>
  58. </formFields>
  59. </root>
  60. </xts:transform>
  61. </xts:append>
  62. </dlgctrl:mode>
  63. <!-- got back selected entries -->
  64. <dlgctrl:mode match="selectedEntries">
  65. <xsl:if test="/root/*[local-name()='morphletResponse']/*[local-name()='selectedEntries']">
  66. <xts:append select="/root">
  67. <selectedEntries>
  68. <xsl:if test="/root/*[local-name()='morphletResponse']/*[local-name()='selectedEntries'] != ''">
  69. <xts:transform name="XMLDecode">
  70. <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap',string(/root/*[local-name()='morphletResponse']/*[local-name()='selectedEntries'])), true())"/>
  71. </xts:transform>
  72. </xsl:if>
  73. </selectedEntries>
  74. </xts:append>
  75. <xts:delete select="/root/env/param[@name='selectedEntries']"/>
  76. <xts:append select="/root/env">
  77. <param name="selectedEntries">
  78. <xsl:value-of select="/root/*[local-name()='morphletResponse']/*[local-name()='selectedEntries']"/>
  79. </param>
  80. </xts:append>
  81. </xsl:if>
  82. </dlgctrl:mode>
  83. </dlgctrl:processXTS2Response>
  84. </xts:sequence>
  85. </xsl:template>
  86. </xsl:stylesheet>