1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 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/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- exclude-result-prefixes="xsl xsi xts xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root/wholeEntries">
- <xsl:for-each select="*">
- <xsl:variable name="current" select="."/>
- <xsl:variable name="rolapCubeType" select="local-name()"/>
- <xsl:variable name="params" select="/root/paramsMetadata/parameter[contains(concat(' ', 'baseROLAPCubeConfiguration', ' ', $rolapCubeType, ' '), concat(' ', @objectDependency, ' '))]"/>
- <xsl:element name="{$rolapCubeType}">
- <xsl:for-each select="$params">
- <xsl:variable name="paramName" select="@name"/>
- <xsl:element name="{$paramName}">
- <xsl:attribute name="xsi:type">
- <xsl:value-of select="@type"/>
- </xsl:attribute>
- <xsl:variable name="paramValue" select="$current/*[local-name()=$paramName] "/>
- <xsl:choose>
- <xsl:when test="$paramValue != ''">
- <xsl:value-of select="$paramValue"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@default"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:element>
- </xsl:for-each>
- </xsl:element>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
|