12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- 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:x="x"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- exclude-result-prefixes="xsl xsi x">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="*[local-name()='options']" priority="1">
- <xsl:element name="options" namespace="{namespace-uri()}">
- <xsl:apply-templates/>
- </xsl:element>
- </xsl:template>
-
- <xsl:template match="*[local-name()='value']" priority="1">
- <!-- want to see if savePromptCache already exists -->
- <xsl:variable name="promptCacheModeAlreadyExists">
- <xsl:value-of select="*[local-name()='item']/*[local-name()='name']='promptCacheMode'"/>
- </xsl:variable>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:for-each select="*[local-name()='item']">
- <xsl:choose>
- <!-- deprecated 'savePromptCache' exists, but the new 'promptCacheMode' does not. Therefore, add
- the new option set to corresponding values.-->
- <xsl:when test="./*[local-name()='name']='savePromptCache' and $promptCacheModeAlreadyExists='false'">
- <item xsi:type="bus:runOptionPromptCacheMode">
- <name xsi:type="bus:runOptionEnum">promptCacheMode</name>
- <value xsi:type="bus:promptCacheModeEnum">
- <xsl:choose>
- <xsl:when test="*[local-name()='value']='true'">create</xsl:when>
- <xsl:otherwise>none</xsl:otherwise>
- </xsl:choose>
- </value>
- </item>
- </xsl:when>
- <!-- simply copy the option if it's not the deprecated 'savePromptCache' option. -->
- <xsl:when test="not(./*[local-name()='name']='savePromptCache')">
- <xsl:copy-of select="."/>
- </xsl:when>
- </xsl:choose>
- </xsl:for-each>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="text()" priority="0"/>
- </xsl:stylesheet>
|