123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2014
- 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/portal.xml, messages/portalRL.xml" includeConfig="true">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block
- id="formlogic_init"
- type="exec"
- mode="interpret"
- processor="XSLT"
- path="/logicsheets/formlogic_init.xslt"
- nodelist="env,credential,system,http"/>
- <xts:block id="getReportStoreId" processor="XSLT" type="exec" dependency="" mandatory="false">
- <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:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <!-- Outputs need to honour reportVersionPath from history pages (view/view_details). -->
- <xsl:variable name="reportVersionPath"><xsl:value-of select="string(/root/env/param[@name= 'reportVersionPath'])"/></xsl:variable>
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
- <xsl:choose>
- <xsl:when test="$reportVersionPath != ''">
- <!-- Get parent if there is a reportVersionPath (this could be a storeID) so we know the name etc. Means it is from history/view.xts and is the actual output to show. -->
- <cm:query>
- <cm:search>
- <xsl:value-of select="$reportVersionPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="creationTime"/>
- <cm:property name="searchPath"/>
- <cm:property name="hidden"/>
- <cm:property name="storeID"/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="parent">
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="storeID"/>
- <cm:property name="searchPath"/>
- <cm:property name="documentType"/>
- <cm:property name="hidden"/>
- <cm:property name="repositoryRules"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- <cm:sortBy>
- <cm:sort name="creationTime" order="descending"/>
- </cm:sortBy>
- </cm:query>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="target-obj">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name= 'sc_target_obj']) != ''"><xsl:value-of select="/root/env/param[@name= 'sc_target_obj']"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name= 'm_obj']"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Get the report -->
- <cm:query>
- <cm:search>
- <xsl:value-of select="$target-obj"/>
- </cm:search>
- <cm:properties>
- <cm:property name="storeID"/>
- <cm:property name="defaultName"/>
- </cm:properties>
- <cm:options>
- <cm:refProps>
- <cm:refProp refPropName="parent">
- <cm:properties>
- <cm:property name="repositoryRules"/>
- </cm:properties>
- </cm:refProp>
- </cm:refProps>
- </cm:options>
- </cm:query>
- </xsl:otherwise>
- </xsl:choose>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- <xts:append>
- <xts:function name="getConfiguration">
- <xts:param name="portal.render.outputpage.asoftime"/>
- </xts:function>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="getRepositoryConnectionInfo" processor="XSLT" type="exec" dependency="getReportStoreId" mandatory="false" condition=".[/root/env/param[@name= 'reportVersionPath']='']">
- <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:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xsl:variable name="datasourceName" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']//*[local-name()='parent']//*[local-name()='repositoryRules']//*[local-name()='dataSourceName'][1]"/>
- <xsl:variable name="sq">'</xsl:variable>
- <!-- must escape the ' to '' to make the search expression CM safe. -->
- <xsl:variable name="cmSafeDatasourceName" select=" xtsext:replace(string($datasourceName), string($sq), concat($sq,$sq))"/>
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
- <cm:query>
- <cm:search>
- dataSourceSignon('<xsl:value-of select="$cmSafeDatasourceName"/>')
- </cm:search>
- <cm:properties>
- <cm:property name="storeID"/>
- <cm:property name="defaultName"/>
- <cm:property name="tenantID"/>
- </cm:properties>
- </cm:query>
- <cm:query>
- <cm:search>
- defaultRepositoryConnection('<xsl:value-of select="$cmSafeDatasourceName"/>')
- </cm:search>
- <cm:properties>
- <cm:property name="storeID"/>
- <cm:property name="defaultName"/>
- <cm:property name="tenantID"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Merge the tenantNames into the response -->
- <xts:block processor="XSLT" type="exec" mandatory="false"
- path="/portal/tenancy/mergeTenantNames.xslt"
- id="mergeTenantNames"
- dependency="getRepositoryConnectionInfo"
- condition=".[/root/session/param[@name='e_showTenantInfo']='true' and count(/root/*[local-name()='queryResponse'][2]/*[local-name()='queryReply'][1]/*[local-name()='dataSourceConnection']) > 1]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
-
- <xts:block id="format" mode="interpret" processor="XSLT" type="exec" mimeType="text/html" dependency="getRepositoryConnectionInfo formlogic_init">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cps="http://developer.cognos.com/schemas/cps/asm/objects/1/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:asm="http://developer.cognos.com/schemas/cps/asm/assembler/1/"
- exclude-result-prefixes="cm cps xos SOAP-ENV SOAP-ENC xsi bus send xtsext">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xsl:variable name="renderSheet">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='output_tab'] = 'arch'">portal/outputs/render_old_versions_titan.xslt</xsl:when>
- <xsl:otherwise>portal/outputs/render_recent_versions_titan.xslt</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append select="/root/output">
- <xts:transform processor="XSLT" nodelist="cookies, http, credential, env, user, system, session, configProps, queryResponse, config, configuration" src="{$renderSheet}" option="part" mimeType="text/html">
- <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/dialog/framework.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/layout.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/controls/framework.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/controls/presentation.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/dialog/presentation.xsl</xts:param>
- <xts:param name="logicsheet">logicsheets/formlogic.xslt</xts:param>
- <xts:param name="logicsheet">logicsheets/validation.xslt</xts:param>
- <xts:param name="logicsheet">portal/outputs/dateVariables.xslt</xts:param>
- <xts:param name="logicsheet">logicsheets/presentation/touch_up.xslt</xts:param>
- <xts:param name="messageBase">messages/portal.xml</xts:param>
- <xts:param name="messageBase">messages/portalRL.xml</xts:param>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Debug -->
- <!-- ============================================================================= -->
- <xts:block id="debug" dependency="format" condition=".[ /root/session/param[@name='debug'] = '1' ]" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <dbg:templates/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|