1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--this template depends on the presence of an element called routingServerGroup with objectPath elements inside
- these will be used to call determine routing-->
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:replace select="/root/routingServerGroup">
- <routingServerGroup>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <xts:request href="bus://cm" protocol="BUS" responseEnvelope="true" soapAction="http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201505/" outputHeader="true" >
- <SOAP-ENV:Envelope 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" xmlns:cm="http://developer.cognos.com/schemas/contentManagerService/1" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <SOAP-ENV:Header>
- <xts:transform src="ags/transforms/transportRequester.xslt" processor="XSLT">
- <root>
- <requester>determineRouting</requester>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- </root>
- </xts:transform>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <!-- get info from CM -->
- <cm:determineRouting>
- <objectPaths xsi:type="xsd:searchPathSingleObjectArray" SOAP-ENC:arrayType="cm:searchPathSingleObject[]">
- <xsl:if test="/root/routingServerGroup//*[local-name()='parent']//*[local-name()='searchPath']">
- <item xsi:type="cm:searchPathSingleObject">
- <xsl:value-of select="/root/routingServerGroup//*[local-name()='parent']//*[local-name()='searchPath']"/>
- </item>
- </xsl:if>
- <xsl:if test="/root/routingServerGroup//*[local-name()='objectPath']">
- <item xsi:type="cm:searchPathSingleObject">
- <xsl:value-of select="/root/routingServerGroup/*[local-name()='objectPath']"/>
- </item>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='obj'] and /root/env/param[@name='obj'] != ''">
- <item xsi:type="cm:searchPathSingleObject">
- <xsl:value-of select="/root/env/param[@name='obj']"/>
- </item>
- </xsl:if>
- </objectPaths>
- </cm:determineRouting>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </xts:transform>
- </routingServerGroup>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|