1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl send cm xtsext xts">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="objTenantId" select="/root/env/param[@name='m_p_tenantID'] | (root/*[local-name()='queryResponse']//cm:tenantID)[last()-1] | /root/*[local-name()='queryResponse']/cm:report/cm:tenantID | /root/*[local-name()='queryResponse']/cm:rolapDataSource/cm:tenantID" />
- <xts:sequence>
- <xts:append>
- <tenantObjInfo>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <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($objTenantId), string($sq), concat($sq,$sq)) "/>
- <xsl:text>/directory/tenants[@name='Tenants']/*[@tenantID='</xsl:text><xsl:value-of select="$cmEncodedObjTenantId"/><xsl:text>']</xsl:text>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="tenantID"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </tenantObjInfo>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|