generateRecipientsSummary.xslt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  13. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  14. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  15. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  16. exclude-result-prefixes="xtsext cm xts">
  17. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  18. <xsl:template match="*">
  19. <xsl:choose>
  20. <xsl:when test="./asParam='true'">
  21. <param name="emailDescription">
  22. <xsl:call-template name="genDescription"/>
  23. </param>
  24. </xsl:when>
  25. <xsl:otherwise>
  26. <xsl:call-template name="genDescription"/>
  27. </xsl:otherwise>
  28. </xsl:choose>
  29. </xsl:template>
  30. <xsl:template name="genDescription">
  31. <xsl:choose>
  32. <xsl:when test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='userName'] != ''">
  33. <xts:string id ="IDS_EMAIL_DISPLAY_USER">
  34. <xts:param name="defaultName"><xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='defaultName']"/></xts:param>
  35. <xts:param name="userName"><xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='userName']"/></xts:param>
  36. </xts:string>
  37. </xsl:when>
  38. <xsl:when test="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='defaultName'] != ''">
  39. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*/*[local-name()='defaultName']"/>
  40. </xsl:when>
  41. <xsl:otherwise><xts:string id="IDS_OTHERRUN_EMAIL_UNKNOWN_RECIPIENT"/></xsl:otherwise>
  42. </xsl:choose>
  43. </xsl:template>
  44. </xsl:stylesheet>