123456789101112131415161718192021222324252627282930313233343536373839 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <!--
- Checks cm response to see if user has an e-mail, if so make them the default recipient, otherwise default to no recipients
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="hasEmail" select="/root/*[local-name()='queryResponse']/*[local-name()='account']/*[local-name()='email'] != ''"/>
- <xsl:variable name="hasNotificationEmail" select="/root/*[local-name()='queryResponse']/*[local-name()='account']/*[local-name()='notificationEMail'] != ''"/>
- <xsl:variable name="isSubscription" select="/root/subscription"/>
- <xsl:template match="/root" priority="1">
- <xsl:if test="$hasEmail or ($isSubscription and $hasNotificationEmail)">
- <param name="to">
- <param name="to"><xsl:value-of select="/root/e_hp"/></param>
- </param>
- </xsl:if>
- </xsl:template>
-
- <xsl:template match="text()" priority="0"/>
-
- </xsl:stylesheet>
|