123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2008
- 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/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xtscm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xts xsl xsi SOAP-ENC xtscm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:for-each select="/root/parameters/xtscm:parameterValue">
- <xsl:variable name="param_name" select="./xtscm:name"/>
- <!--replace existing params by param name (or append if not there) -->
- <xts:delete select="/root/agent_item/parameterData/parameterValues/item[./name = '{$param_name}']"/>
- <xts:append select="/root/agent_item/parameterData/parameterValues">
- <!-- must transform any params from rs to cm style -->
- <xts:transform src="transforms/portal/parameters/pre-WARP-process.xslt" processor="XSLT">
- <xsl:copy-of select="."/>
- </xts:transform>
- </xts:append>
- </xsl:for-each>
- <xsl:for-each select="/root/env/param[starts-with(@name, 'pv_ndz_')]">
- <xsl:variable name="param_name" select="substring-before(substring-after(@name, 'pv_ndz_'), '_pv_ndz')"/>
- <xsl:variable name="param_value" select="."/>
- <!--replace existing params by param name (or append if not there) -->
- <xts:delete select="/root/agent_item/parameterData/parameterValues/item[./name = '{$param_name}']"/>
- <xts:append select="/root/agent_item/parameterData/parameterValues">
- <item xsi:type="cm:parameterValue">
- <name xsi:type="xsd:string"><xsl:value-of select="$param_name"/></name>
- <value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:parmValueItem[1]">
- <item xsi:type="bus:simpleParmValueItem">
- <inclusive xsi:type="xsd:boolean">true</inclusive>
- <display xsi:type="xsd:string"><xsl:value-of select="$param_value"/></display>
- <use xsi:type="xsd:string"><xsl:value-of select="$param_value"/></use>
- </item>
- </value>
- </item>
- </xts:append>
- </xsl:for-each>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
|