1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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).
- -->
- <!--
- Transform used to change a CM response into the same structure returned by add recipients.
- Usefull since it allow us to use the same transforms to update the to, cc and bcc fields and also
- to update the email recipients blob.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl cm xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
-
- <!-- The stardard addentries list is simply a list of object, so copy everything under the queryReply -->
- <xsl:template match="/root/cm:queryResponse" priority="2">
- <xsl:for-each select="cm:queryReply">
- <xsl:variable name="pos" select="position()"/>
- <xsl:choose>
- <xsl:when test="not(*) and (not(/root/env/param[@name!='listop']) or /root/env/param[@name='listop']!='removeUnavailableObjects')">
- <unavailable nil="true">
- <searchPath><xsl:value-of select="/root/*[local-name()='searchPaths']/*[local-name()='query'][position()=$pos]/*[local-name()='search']"/></searchPath>
- </unavailable>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="*"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template match="text()" priority="0"/>
- </xsl:stylesheet>
|