123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2013
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:create="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/" xmlns:cms="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cms/1/">
- <xts:block id="doFormCommand" processor="XSLT" type="exec">
- <xts:logicsheet path="portal/iFrmCmd/logicsheets/cm-save.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:form="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xts send form xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/root/command/form:terminateSessions/form:env">
- <xts:sequence>
- <xts:append>
- <send:request provider="cam">
- <cam:terminateSessions xmlns:cam="http://developer.cognos.com/schemas/saCAMService/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <search>
- <xsl:variable name="tenants">
- <xsl:choose>
- <xsl:when test="(form:param[@name = 'm_obj'] and (form:param[@name = 'm_obj'] != ''))">
- <!-- Single object delete. -->
- <id><xsl:value-of select="form:param[@name = 'm_obj']"/></id>
- </xsl:when>
- <xsl:otherwise>
- <!-- Group object delete. -->
- <xsl:for-each select="form:param[starts-with(@name, 'checkbox_')]">
- <id><xsl:value-of select="."/></id>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:for-each select="$tenants/id">
- <xsl:variable name="sq">'</xsl:variable>
- <!-- must escape the ' to '' to make the search expression CM safe. -->
- <xsl:variable name="cmEncodedObjTenantId" select="xtsext:replace(string(.), string($sq), concat($sq,$sq)) "/>
- <xsl:choose>
- <xsl:when test="position()=1">/session/*[</xsl:when>
- <xsl:otherwise> or </xsl:otherwise>
- </xsl:choose>
- @tenantID='<xsl:value-of select="$cmEncodedObjTenantId"/>'
- <xsl:if test="position()=last()">]</xsl:if>
- </xsl:for-each>
- </search>
- </cam:terminateSessions>
- </send:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!-- operation results -->
- <xts:block id="commandResults" processor="XSLT" type="exec" mode="output" mimeType="text/xml" dependency="doFormCommand">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cam="http://developer.cognos.com/schemas/saCAMService/1"
- exclude-result-prefixes="xsl">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <xsl:choose>
- <xsl:when test="cam:terminateSessionsResponse"><xsl:copy-of select="cam:terminateSessionsResponse"/></xsl:when>
- <xsl:otherwise><error/></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|