123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?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()='queryResponse']" priority="1">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <!-- loop through all the job steps -->
- <xsl:for-each select="*[local-name()='jobStepDefinition']">
- <!-- want to see if savePromptCache already exists -->
- <xsl:variable name="promptCacheModeAlreadyExists">
- <xsl:value-of select="*[local-name()='options']/*[local-name()='value']/*[local-name()='item']/*[local-name()='name']='promptCacheMode'"/>
- </xsl:variable>
- <xsl:copy>
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates select="*">
- <xsl:with-param name="promptCacheModeAlreadyExists" select="$promptCacheModeAlreadyExists"/>
- </xsl:apply-templates>
- </xsl:copy>
- </xsl:for-each>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="*[local-name()='item' and *[local-name()='name']='savePromptCache']">
- <xsl:param name="promptCacheModeAlreadyExists" select="false()"/>
- <xsl:choose>
- <xsl:when test="not($promptCacheModeAlreadyExists)">
- <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>
- </xsl:choose>
- </xsl:template>
-
-
- <!--
- This next template is required to copy all other elements into the result
- -->
- <xsl:template match="*">
- <xsl:copy>
- <xsl:copy-of select="@*|text()"/>
- <xsl:apply-templates select="*"/>
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
|