setMorphletActions.xslt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. 2010, 2011
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. ===============================================================================================
  10. Defines the display actions for a morphlet: there are the following:
  11. - showCurrentPage: the current page is displayed from the navigation flow,
  12. - callAddEntriesPage: The add entry page needs to be invoked
  13. ===============================================================================================
  14. -->
  15. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/">
  16. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  17. <xsl:template match="/">
  18. <xsl:variable name="controller_state" select="string(/root/env/param[@name='controller_state'])"/>
  19. <xts:sequence>
  20. <xts:append select="/root">
  21. <xsl:choose>
  22. <xsl:when test="$controller_state ='addEntries|finished' or $controller_state ='addEntries|canceled'">
  23. <showCurrentPage/>
  24. <callAddEntriesPage/>
  25. </xsl:when>
  26. <xsl:when test="starts-with($controller_state,'addEntries|')">
  27. <callAddEntriesPage/>
  28. </xsl:when>
  29. <xsl:otherwise>
  30. <showCurrentPage/>
  31. </xsl:otherwise>
  32. </xsl:choose>
  33. </xts:append>
  34. </xts:sequence>
  35. </xsl:template>
  36. </xsl:stylesheet>