123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: Viewer
- (C) Copyright IBM Corp. 2001, 2011
- US Government Users Restricted Rights - Use, duplication or
- disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- exclude-result-prefixes="xsl xts">
- <xsl:output method="xml" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root/env">
- <xts:sequence>
- <xts:replace select="/root/env/param[@name='inlineSpec' or @name='ui.spec']"><param name="ui.spec"><xsl:value-of select="/root/env/param[@name='inlineSpec' or @name='ui.spec']"/></param></xts:replace>
- <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='conversation' or @name='ui.conversation']"><param name="ui.conversation"><xsl:value-of select="/root/env/param[@name='conversation' or @name='ui.conversation']"/></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='m_path' or @name='ui.folder']"><param name="ui.folder"><xsl:value-of select="/root/env/param[@name='m_path' or @name='ui.folder']"/></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='outputLocale' or @name='ui.outputLocale']"><param name="run.outputLocale"><xsl:value-of select="/root/env/param[@name='outputLocale' or @name='ui.outputLocale']"/></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'])='execute'">run</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:delete select="/root/env/param[@name='ui.object' or @name='m_obj' or @name='obj']"/>
- <xts:append select="/root/env">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='ui.object']">
- <param name="ui.object"><xsl:value-of select="/root/env/param[@name='ui.object']"/></param>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='m_obj']">
- <param name="ui.object"><xsl:value-of select="/root/env/param[@name='m_obj']"/></param>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='obj']">
- <param name="ui.object"><xsl:value-of select="/root/env/param[@name='obj']"/></param>
- </xsl:when>
- </xsl:choose>
- </xts:append>
- <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='cv.header' or @name='ui.header' or @name='nh']">
- <param name="cv.header">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='nh']='0'">true</xsl:when>
- <xsl:when test="/root/env/param[@name='nh']">false</xsl:when>
- <xsl:when test="/root/env/param[@name='ui.header']"><xsl:value-of select="/root/env/param[@name='ui.header']"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='cv.header']"/></xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='cv.toolbar' or @name='ui.toolbar' or @name='tb']">
- <param name="cv.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:when test="/root/env/param[@name='ui.toolbar']"><xsl:value-of select="/root/env/param[@name='ui.toolbar']"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='cv.toolbar']"/></xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xts:replace select="/root/env/param[@name='cv.navlinks' or @name='ui.navlinks' or @name='nl']">
- <param name="cv.navlinks">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='nl']='1'">true</xsl:when>
- <xsl:when test="/root/env/param[@name='nl']='0'">false</xsl:when>
- <xsl:when test="/root/env/param[@name='ui.navlinks']"><xsl:value-of select="/root/env/param[@name='ui.navlinks']"/></xsl:when>
- <xsl:otherwise><xsl:value-of select="/root/env/param[@name='cv.navlinks']"/></xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:replace>
- <xsl:choose>
- <xsl:when test="not(/root/env/param[@name='cv.id']) or /root/env/param[@name='cv.id']=''">
- <xts:delete select="/root/env/param[@name='cv.id']"/>
- <xts:append select="/root/env">
- <xsl:variable name="cvTempId"><xsl:value-of select="generate-id()"/></xsl:variable>
- <param name="cv.id"><xsl:value-of select="$cvTempId"/></param>
- </xts:append>
- </xsl:when>
- <xsl:otherwise>
- <xts:append select="/root/env">
- </xts:append>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="string(/root/env/param[@name='specificationType'])='Analysis'">
- <xts:replace select="/root/env/param[@name='specificationType']">
- <param name="specificationType">reportServiceAnalysisSpecification</param>
- </xts:replace>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|