| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 | <?xml version="1.0" encoding="UTF-8"?><!--Licensed Materials - Property of IBMBI and PM: qs(C) Copyright IBM Corp. 2001, 2017US 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).--><xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml">	<xts:block id="getDimensions" mode="interpret" processor="XSLT" type="exec" mandatory="false">		<xts:logicsheet path="logicsheets/buslogic.xslt"/>		<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">			<xsl:key name="env-param" match="/root/env/param" use="@name"/>			<xsl:output method="xml" version="1.0" encoding="UTF-8"/>			<xsl:variable name="authoringLocale">				<xsl:choose>					<xsl:when test="/root/env/param[@name='el']!=''">						<xsl:value-of select="/root/env/param[@name='el']"/>					</xsl:when>					<xsl:otherwise>						<xsl:value-of select="/root/env/param[@name='cl']"/>					</xsl:otherwise>				</xsl:choose>			</xsl:variable>			<xsl:template match="/">				<xts:sequence>					<xts:append>						<xts:request asText="true" href="bus://dispatcher" protocol="BUS" soapAction="http://www.ibm.com/xmlns/prod/cognos/reportService/201404/.session" faultBlock="faultHandler" responseEnvelope="false" outputHeader="true">							<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">								<SOAP-ENV:Header>									<bus:biBusHeader xsi:type="bus:biBusHeader" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">										<xsl:if test="key('env-param','m_tracking')!=''">											<!-- use the round-tripped tracking information -->											<bus:tracking>												<xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','m_tracking'))), true())" disable-output-escaping="yes"/>											</bus:tracking>										</xsl:if>										<xsl:if test="key('env-param','ui.routingServerGroup')!=''">											<bus:routing>												<routingServerGroup>													<xsl:value-of select="key('env-param','ui.routingServerGroup')"/>												</routingServerGroup>											</bus:routing>										</xsl:if>										<!-- We don't want to copy the tracking info in this case because we want a separate conversation for the metadata -->										<xsl:apply-templates select="/root/header/bus:biBusHeader/*[local-name()!='tracking']"/>									</bus:biBusHeader>								</SOAP-ENV:Header>								<SOAP-ENV:Body>									<runSpecification xmlns="http://developer.cognos.com/schemas/reportService/1">										<bus:specification xsi:type="bus:reportServiceMetadataSpecification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">											<bus:value xsi:type="bus:specification"><metadataRequest connection="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='model']))"/>">												<Metadata authoringLocale="<xsl:value-of select="$authoringLocale"/>" xml:lang="<xsl:value-of select="/root/env/param[@name='pl']"/>" Depth="" _enumLabels="1" no_collections="1" start_atPath="">													<Properties>														<Property name="*/@name"/>														<Property name="*/@_ref"/>														<Property name="*/@usage"/>														<Property name="*/@description"/>														<Property name="*/@screenTip"/>														<Property name="hierarchy/@parentChild"/>														<Property name="measure/@regularAggregate"/>														<Property name="./folder"/>														<Property name="./dimension"/>														<Property name="dimension/@type"/>														<Property name="./hierarchy"/>														<Property name="./level"/>														<Property name="./measure"/>														<Property name="./measureFolder"/>														<Property name="level/member"/>														<Property name="level/@_RootMembers"/>														<Property name="/@modelSearchPath"/>													</Properties>												</Metadata>											</metadataRequest>											</bus:value>										</bus:specification>										<bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"/>										<bus:options xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:option[]" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">											<item xsi:type="bus:runOptionString">												<bus:name xsi:type="bus:runOptionEnum">promptFormat</bus:name>												<bus:value xsi:type="xsd:string">HTML</bus:value>											</item>											<item xsi:type="bus:runOptionBoolean">												<bus:name xsi:type="bus:runOptionEnum">prompt</bus:name>												<bus:value xsi:type="xsd:boolean">false</bus:value>											</item>											<item xsi:type="bus:asynchOptionInt">												<bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>												<bus:value xsi:type="xsd:int">0</bus:value>											</item>										</bus:options>									</runSpecification>								</SOAP-ENV:Body>							</SOAP-ENV:Envelope>						</xts:request>					</xts:append>				</xts:sequence>			</xsl:template>			<!-- used to copy the bus header stuff - see "apply-templates" above. -->			<xsl:template match="*">				<xsl:copy>					<xsl:copy-of select="@*"/>					<xsl:apply-templates/>				</xsl:copy>			</xsl:template>		</xsl:stylesheet>	</xts:block>	<xts:block id="appendDimensions" mode="interpret" processor="XSLT" type="exec" dependency="getDimensions" mandatory="false">		<xts:logicsheet path="logicsheets/buslogic.xslt"/>		<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/cm/1/" xmlns:SOAP-ENV="http://www.w3.org/2001/09/soap-envelope" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xos="http://developer.cognos.com/schemas/xts/output/">			<xsl:key name="env-param" match="/root/env/param" use="@name"/>			<xsl:output method="xml" version="1.0" encoding="UTF-8"/>			<xsl:template match="/root">				<xts:sequence>					<xts:append select="/root">						<dimensions>							<xsl:choose>								<xsl:when test="contains(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '<?xml')">									<xsl:value-of select="substring-after(./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata, '?>')" disable-output-escaping="yes"/>								</xsl:when>								<xsl:otherwise>									<xsl:value-of select="./*[local-name() = 'runSpecificationResponse']/bus:result/bus:details/item/bus:metadata" disable-output-escaping="yes"/>								</xsl:otherwise>							</xsl:choose>						</dimensions>					</xts:append>					<xts:append select="/root">						<RootMemberResponse/>					</xts:append>				</xts:sequence>			</xsl:template>		</xsl:stylesheet>	</xts:block>	<xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/html" dependency="appendDimensions">		<!-- get the debug logic sheet -->		<xts:logicsheet path="logicsheets/debuglogic.xslt"/>		<xts:logicsheet path="logicsheets/portal.xsl"/>		<!-- apply the form logic -->		<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:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="xsl xts dbg xtsext bus pf">			<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>			<pf:variables/>			<!-- start the output -->			<xsl:template match="/root">				var dimBarItem;				var dimBarItemDropDown;				<xsl:for-each select="/*[local-name()='root']/*[local-name()='dimensions']/ResponseRoot/folder/*[local-name()='dimension']">					<xsl:choose>						<xsl:when test="./@type='measure'">							dimBarItem = new CMenuItem(gQsDimbar, '<xsl:value-of select="./@name"/>', '', '',gMenuItemStyle, '<xsl:value-of select="$webRoot"/>', '<xsl:value-of select="$skin_root"/>');							dimBarItemDropDown = dimBarItem.createDropDownMenu(gDimbarStyle);							<xsl:variable name="dimIdx"><xsl:value-of select="position()-1"/></xsl:variable>							<xsl:for-each select="./measure">								dimBarItem = new CMenuItem(dimBarItemDropDown, '<xsl:value-of select="./@name"/>', 'slicer(\'MEASURES\',\'none\',\'none\',\'<xsl:value-of select="./@_ref"/>\',\'<xsl:value-of select="./@name"/>\', \'<xsl:value-of select="$dimIdx"/>\')', '',gMenuItemStyle, '<xsl:value-of select="$webRoot"/>', '<xsl:value-of select="$skin_root"/>');							</xsl:for-each>						</xsl:when>						<xsl:otherwise>							dimBarItem = new CMenuItem(gQsDimbar, '<xsl:value-of select="./hierarchy/@name"/>', '', '',gMenuItemStyle, '<xsl:value-of select="$webRoot"/>', '<xsl:value-of select="$skin_root"/>');							dimBarItemDropDown = dimBarItem.createDropDownMenu(gDimbarStyle);							var dimbarItemId<xsl:value-of select="position()-1"/> = dimBarItem.getId();							dimBarItemDropDown.registerCallback(function test<xsl:value-of select="position()-1"/>(){loadDimBarItem(dimbarItemId<xsl:value-of select="position()-1"/>,'<xsl:value-of select="position()-1"/>','<xsl:value-of select="./hierarchy/@name"/>','<xsl:value-of select="./hierarchy/level[2]/@_ref"/>');});							gQsDimbar.add(gToolbarSeperator);						</xsl:otherwise>					</xsl:choose>				</xsl:for-each>				gQsDimbar.draw();			</xsl:template>		</xsl:stylesheet>	</xts:block>	<xts:block id="faultHandler" type="fault" processor="XSLT">		<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="xsl">			<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>			<xsl:template match="/">				<xsl:choose>					<xsl:when test="//*[local-name()='CAM']/*[local-name()='exception']//*[local-name()='promptInfo'] or contains(//*[local-name()='exception']/*[local-name()='message']/*[local-name()='messageString'], 'QE-DEF-0313')">						<logonFault>timeout</logonFault>					</xsl:when>					<xsl:otherwise>						<soapFault>							<xsl:copy>								<xsl:copy-of select="/root/fault"/>							</xsl:copy>						</soapFault>					</xsl:otherwise>				</xsl:choose>			</xsl:template>			<xsl:template match="text()"/>		</xsl:stylesheet>	</xts:block></xts:morphlet>
 |