123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?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.
- -->
- <xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml" requiredCapability="canUseEventStudio">
- <!-- place the specificiation we want into the DOM -->
- <xts:block id="buildSpecification" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="pf bus xtsext">
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="storedProc">
- <!-- when there is something in the update spec use that if not then blank the variable. -->
- <xsl:value-of select="/root/env/param[@name='sql_procedure_name']"/>
- </xsl:variable>
- <xts:sequence>
- <xts:append>
- <specification>
- <qs:command xmlns:qs="http://developer.cognos.com/schemas/qf_xml_api/3/">
- <connection>
- <QFProviderType value="QueryFrameworkService"/>
- <contentManagerURI value="<xsl:value-of select="/root/configProps/param/property[@name='contentManager']"/>"/>
- <productLocale value="<xsl:value-of select="/root/env/param[@name='pl']"/>"/>
- <runLocale value="<xsl:value-of select="/root/env/param[@name='cl']"/>"/>
- <CAMPassport value="<xsl:value-of select="$passport"/>"/>
- </connection>
- <update>
- <updateSet>
- <modelPath><xsl:value-of select="/root/env/param[@name='sql_package']"/></modelPath>
- <updateSubject name="subject1"><xts:transform name="XMLEncode"><xsl:value-of select="$storedProc"/></xts:transform></updateSubject>
- </updateSet>
- </update>
- </qs:command>
- </specification>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--call the getExternalRequest to see if the request came from the /ext entry point -->
- <xts:block id="getExternalRequest" dependency="buildSpecification" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" exclude-result-prefixes="pf">
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <externalRequest>
- <xts:function name="getRequestExternal" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:param name="passport">
- <xsl:value-of select="$passport"/>
- </xts:param>
- <xts:param name="secureState">
- <xsl:value-of select="/root/header/*[local-name()='biBusHeader']/*[local-name()='CAF']/*[local-name()='secureState']"/>
- </xts:param>
- </xts:function>
- </externalRequest>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!-- depending on the output of the getExternalRequest request - sign the request -->
- <xts:block id="signSpecification" dependency="getExternalRequest" processor="XSLT" type="exec">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <signedSpec>
- <xsl:choose>
- <xsl:when test="/root/getRequestExternalResponse">
- <xts:function name="signReportSpec" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:param name="source">
- <xsl:value-of select="/root/specification"/>
- </xts:param>
- </xts:function>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/specification"/>
- </xsl:otherwise>
- </xsl:choose>
- </signedSpec>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="makeRequest" dependency="signSpecification" mode="output" mimeType="text/xml" processor="XSLT" type="exec">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
- <!-- build the metadata request -->
- <xsl:template match="/">
- <xsl:call-template name="buildMetadataRequest"/>
- </xsl:template>
- <xsl:template name="buildMetadataRequest">
- <bus:value xsi:type="bus:specification" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <xsl:value-of select="/root/signedSpec"/>
- </bus:value>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|