1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- 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).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio, canUseReportStudio">
- <xts:block id="querySessionInCM" mode="interpret" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <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:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl xts send bus xsi send">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <send:request provider="warp" asText="true" responseEnvelope="true" soapAction="http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201404/" faultBlock="faultHandler">
- <cm:add xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
- <search>~~</search>
- <objects>
- <item xsi:type="bus:query">
- <searchPath>
- <value>~~</value>
- </searchPath>
- <defaultName>
- <value>query</value>
- </defaultName>
- <specification>
- <xsl:choose>
- <xsl:when test="starts-with(string(/root/env/param[@name='xxSpec']),'<')">
- <value xsi:type="xs:string"><xsl:value-of select="/root/env/param[@name='xxSpec']"/></value>
- </xsl:when>
- <xsl:otherwise>
- <value xsi:type="xs:string"><xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxSpec']))" disable-output-escaping="yes"/></value>
- </xsl:otherwise>
- </xsl:choose>
- </specification>
- </item>
- </objects>
- <options>
- <updateAction>update</updateAction>
- </options>
- </cm:add>
- </send:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- Process Response
- -->
- <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/plain" dependency="querySessionInCM">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="bus">
- <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="/root/logonFault">
- <xsl:text/>FAULT;timeout<xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/*[local-name()='Envelope']/*[local-name()='Body']/*/*/*/*[local-name()='searchPath']/*[local-name()='value']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="faultHandler" path="qs/logicsheets/faultHandler.xsl" type="fault" processor="XSLT"/>
- </xts:morphlet>
|