12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:sl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/prmt/soaplogic/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <sl:soaplogic/>
- <xsl:template match="/*[local-name()='selectChoicesSpecification']/*[local-name()='PromptValues']">
- <root>
- <PromptValues>
- <xsl:for-each select="./*[local-name()='PromptValue']">
- <PromptValue>
- <xsl:for-each select="@*">
- <xsl:attribute name="{name()}">
- <xsl:value-of select="."/>
- </xsl:attribute>
- </xsl:for-each>
- <xsl:for-each select="*[local-name()='selectChoices']">
- <selectChoices>
- <xsl:for-each select="./*">
- <xsl:element name="{name()}">
- <xsl:for-each select="@*[not(name()='useValue' or name()='mun')]">
- <xsl:attribute name="{name()}">
- <xsl:value-of select="."/>
- </xsl:attribute>
- </xsl:for-each>
- <xsl:choose>
- <xsl:when test="string(./@mun)!=''">
- <xsl:attribute name="useValue"><xsl:value-of select="./@mun"/></xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="useValue"><xsl:value-of select="./@useValue"/></xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:for-each>
- </selectChoices>
- </xsl:for-each>
- </PromptValue>
- </xsl:for-each>
- </PromptValues>
- </root>
- </xsl:template>
- <xsl:template match="*[local-name()='root']">
- <xsl:call-template name="SetParameters"/>
- </xsl:template>
- </xsl:stylesheet>
|