123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2008
- 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">
- <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>
- <specification>
- <metadataRequest connection="<xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='model']))"/>">
- <Functions authoringLocale="<xsl:value-of select="/root/env/param[@name='cl']"/>" xml:lang="<xsl:value-of select="/root/env/param[@name='pl']"/>">
- <Properties>
- <Property name="/@decimalSeparator"/>
- <Property name="/@listSeparator"/>
- <Property name="./group"/>
- <Property name="*/@id"/>
- <Property name="group/@name"/>
- <Property name="group/@qosLevel"/>
- <Property name="./function"/>
- <Property name="function/@name"/>
- <Property name="function/@tip"/>
- <Property name="function/@syntax"/>
- <Property name="function/@dropText"/>
- <Property name="function/@type"/>
- <Property name="function/@qosLevel"/>
- </Properties>
- <Constraints>
- <Constraint Condition="FDS[@context='tabular']"/>
- </Constraints>
- </Functions>
- </metadataRequest>
- </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>
- <!-- build the output we want with the signed request -->
- <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 function tree request -->
- <xsl:template match="/">
- <xsl:call-template name="makeFunctionTreeRequest"/>
- </xsl:template>
- <!-- call the template which is going to make the function tree request -->
- <xsl:template name="makeFunctionTreeRequest">
- <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>
|