render-links.xslt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: HTS
  5. (C) Copyright IBM Corp. 2005, 2010
  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:xts="http://developer.cognos.com/schemas/xts/">
  9. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  10. <xsl:template match="/">
  11. <script>
  12. function _THIS_linkdropdown(control) {
  13. var reportID = control.options[control.selectedIndex].value;
  14. _THIS_.transientUpdate("display_id", reportID, "page", "taskLinkViewer");
  15. }
  16. </script>
  17. <table cellpadding="3" cellspacing="2" border="0" width="100%" align="left">
  18. <tr>
  19. <td>
  20. <select class="selectDropDown" onchange="_THIS_linkdropdown(this)">
  21. <option value=""><xts:string id="IDS_FRAG_LINK_VIEWER_SELECT_REPORT_PROMPT"/></option>
  22. <xsl:call-template name="displayLinks">
  23. <xsl:with-param name="links" select="/root/input[@name='dep']/queryResponse/*"/>
  24. </xsl:call-template>
  25. </select>
  26. </td>
  27. </tr>
  28. </table>
  29. </xsl:template>
  30. <xsl:template name="displayLinks">
  31. <xsl:param name="links"/>
  32. <xsl:for-each select="$links">
  33. <xsl:variable name="link_id" select="*[local-name()='linkId']"/>
  34. <option value="{$link_id}">
  35. <xsl:value-of select="*[local-name()='display']"/>
  36. </option>
  37. </xsl:for-each>
  38. </xsl:template>
  39. </xsl:stylesheet>