123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <?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).
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xts pf xtsext">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root/env">
- <xts:sequence>
- <xts:replace select="/root/env/param[@name='m_name' or @name='ui.name']"><param name="ui.name"><xsl:value-of select="/root/env/param[@name='m_name' or @name='ui.name']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='format' or @name='ui.format']"><param name="ui.format"><xsl:value-of select="/root/env/param[@name='format' or @name='ui.format']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='drillThroughTargetParameterValues' or @name='ui.drillThroughTargetParameterValues']"><param name="ui.drillThroughTargetParameterValues"><xsl:value-of select="/root/env/param[@name='drillThroughTargetParameterValues' or @name='ui.drillThroughTargetParameterValues']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='xslURL' or @name='run.xslURL']"><param name="run.xslURL"><xsl:value-of select="/root/env/param[@name='xslURL' or @name='run.xslURL']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='prompt' or @name='run.prompt']"><param name="run.prompt"><xsl:value-of select="/root/env/param[@name='prompt' or @name='run.prompt']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='primaryWaitThreshold' or @name='async.primaryWaitThreshold']"><param name="async.primaryWaitThreshold"><xsl:value-of select="/root/env/param[@name='primaryWaitThreshold' or @name='async.primaryWaitThreshold']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='secondaryWaitThreshold' or @name='async.secondaryWaitThreshold']"><param name="async.secondaryWaitThreshold"><xsl:value-of select="/root/env/param[@name='secondaryWaitThreshold' or @name='async.secondaryWaitThreshold']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='backURL' or @name='ui.backURL']"><param name="ui.backURL"><xsl:value-of select="/root/env/param[@name='backURL' or @name='ui.backURL']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='errURL' or @name='ui.errURL']"><param name="ui.errURL"><xsl:value-of select="/root/env/param[@name='errURL' or @name='ui.errURL']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='data' or @name='run.data']"><param name="run.data"><xsl:value-of select="/root/env/param[@name='data' or @name='run.data']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='outputPageDefinition' or @name='run.outputPageDefinition']"><param name="run.outputPageDefinition"><xsl:value-of select="/root/env/param[@name='outputPageDefinition' or @name='run.outputPageDefinition']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='outputPageOrientation' or @name='run.outputPageOrientation']"><param name="run.outputPageOrientation"><xsl:value-of select="/root/env/param[@name='outputPageOrientation' or @name='run.outputPageOrientation']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='recordingEnabled' or @name='run.recordingEnabled']"><param name="run.recordingEnabled"><xsl:value-of select="/root/env/param[@name='recordingEnabled' or @name='run.recordingEnabled']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='horizontalElements' or @name='run.horizontalElements']"><param name="run.horizontalElements"><xsl:value-of select="/root/env/param[@name='horizontalElements' or @name='run.horizontalElements']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='verticalElements' or @name='run.verticalElements']"><param name="run.verticalElements"><xsl:value-of select="/root/env/param[@name='verticalElements' or @name='run.verticalElements']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='attachmentEncoding' or @name='run.attachmentEncoding']"><param name="run.attachmentEncoding"><xsl:value-of select="/root/env/param[@name='attachmentEncoding' or @name='run.attachmentEncoding']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='sh' or @name='ui.sh']"><param name="ui.sh"><xsl:value-of select="/root/env/param[@name='sh' or @name='ui.sh']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='bm' or @name='ui.bookmark']"><param name="ui.bookmark"><xsl:value-of select="/root/env/param[@name='bm' or @name='ui.bookmark']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='un' or @name='ui.username']"><param name="ui.username"><xsl:value-of select="/root/env/param[@name='un' or @name='ui.username']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='cafcontextid' or @name='ui.cafcontextid']"><param name="ui.cafcontextid"><xsl:value-of select="/root/env/param[@name='cafcontextid' or @name='ui.cafcontextid']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='markup_track']"><param name="markup_track"><xsl:value-of select="/root/env/param[@name='markup_track']"/></param></xts:replace>
- <xts:replace select="/root/env/param[@name='ui.action' or @name='method']">
- <param name="ui.action">
- <xsl:choose>
- <xsl:when test="string(/root/env/param[@name='ui.action' or @name='method'])='run'">execute</xsl:when>
- <xsl:when test="string(/root/env/param[@name='ui.action' or @name='method'])='newQuery'">new</xsl:when>
- <xsl:when test="string(/root/env/param[@name='ui.action' or @name='method'])='editQuery'">edit</xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='ui.action' or @name='method']"/></xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='ui.object' or @name='m_obj' or @name='obj']">
- <param name="ui.object">
- <xsl:choose>
- <xsl:when test="starts-with(string(/root/env/param[@name='ui.object' or @name='m_obj' or @name='obj']),'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='ui.object' or @name='m_obj' or @name='obj'])), true())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(/root/env/param[@name='ui.object' or @name='m_obj' or @name='obj'],true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='ui.cacheContext']">
- <param name="ui.cacheContext">
- <xsl:choose>
- <xsl:when test="starts-with(string(/root/env/param[@name='ui.cacheContext']),'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='ui.cacheContext'])), true())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(/root/env/param[@name='ui.cacheContext'],true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='conversation' or @name='ui.conversation']">
- <param name="ui.conversation">
- <xsl:choose>
- <xsl:when test="starts-with(string(/root/env/param[@name='conversation' or @name='ui.conversation']),'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='conversation' or @name='ui.conversation'])), true())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(/root/env/param[@name='conversation' or @name='ui.conversation'],true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='inlineSpec' or @name='ui.spec']">
- <param name="ui.spec">
- <xsl:choose>
- <xsl:when test="starts-with(string(/root/env/param[@name='inlineSpec' or @name='ui.spec']),'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='inlineSpec' or @name='ui.spec'])), true())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(/root/env/param[@name='inlineSpec' or @name='ui.spec'],true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='m_path' or @name='ui.folder']">
- <param name="ui.folder">
- <xsl:choose>
- <xsl:when test="starts-with(string(/root/env/param[@name='m_path' or @name='ui.folder']),'CAF')">
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(/root/env/param[@name='m_path' or @name='ui.folder'])), true())"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="xtsext:web64decode(/root/env/param[@name='m_path' or @name='ui.folder'],true())"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='ui.gateway' or @name='gateway' or @name='gatewayURI']">
- <param name="ui.gateway">
- <xsl:value-of select="/root/env/param[@name='ui.gateway' or @name='gateway' or @name='gatewayURI']"/>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='run.outputFormat' or @name='ui.outputFormat' or @name='outputFormat']">
- <param name="run.outputFormat">
- <xsl:value-of select="/root/env/param[@name='run.outputFormat' or @name='ui.outputFormat' or @name='outputFormat']"/>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='ui.debug' or @name='debug' or @name='d']">
- <xsl:variable name="v" select="/root/env/param[@name='ui.debug' or @name='debug' or @name='d']"/>
- <param name="ui.debug">
- <xsl:choose>
- <xsl:when test="$v='1' or $v='true'">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='ui.header' or @name='nh']">
- <param name="ui.header">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='nh']">false</xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='ui.header']"/></xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='ui.toolbar' or @name='tb']">
- <param name="ui.toolbar">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='tb']='1'">true</xsl:when>
- <xsl:when test="/root/env/param[@name='tb']='0'">false</xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='ui.toolbar']"/></xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- </xts:sequence>
- </xsl:template>
- <pf:serialize-xml/>
- </xsl:stylesheet>
|