1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?xml version="1.0"?>
- <xsl:stylesheet xmlns="http://www.developer.cognos.com/schemas/bmt/58/0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fmfunc="http://www.developer.cognos.com/bmt" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="fmfunc xalan">
- <xsl:include href="fmmd_generalTemplates.xsl"/>
- <xsl:strip-space elements="*"/>
- <xsl:output encoding="utf-8" method="xml" indent="no"/>
-
-
-
- <xsl:template match="*[local-name() = 'queryItem' or local-name() = 'measure']/*[local-name() = 'property' and @*[local-name() = 'name' and . = 'SAPAggregate']]"/>
-
- <xsl:template match="*[local-name() = 'queryItem' or local-name() = 'measure']/*[local-name() = 'aggregationRule' or local-name() = 'regularAggregate' or local-name() = 'semiAggregate']/text()">
- <xsl:choose>
- <xsl:when test=". = 'any'">unknown</xsl:when>
- <xsl:when test=". = 'averageNonZero'">unknown</xsl:when>
- <xsl:when test=". = 'external'">unknown</xsl:when>
- <xsl:when test=". = 'currentPeriod'">unknown</xsl:when>
- <xsl:when test=". = 'firstPeriod'">unknown</xsl:when>
- <xsl:when test=". = 'lastPeriod'">unknown</xsl:when>
- <xsl:when test=". = 'countNonZero'">
-
- <xsl:choose>
- <xsl:when test="ancestor::*[local-name() = 'querySubject' or local-name() = 'dimension'][1][*[local-name() = 'definition']/*[local-name() = 'mdQuery']]">unknown</xsl:when>
- <xsl:otherwise>
- <xsl:copy/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template match="*[local-name()='dataSource']/*[local-name()='property' and @*[local-name()='name' and .='SAP BW Variables']]/*/*[local-name()='property' and @*[local-name()='name' and .='type']]">
- <xsl:variable name="varType" select="."/>
- <xsl:choose>
- <xsl:when test="$varType = 'characteristic' or $varType = 'hierarchicalNode'">
- <xsl:call-template name="myCopy"/>
- <xsl:element name="property">
- <xsl:attribute name="name">showKeyAndCaption</xsl:attribute>
- <xsl:attribute name="type">boolean</xsl:attribute>
- <xsl:value-of select="'false'"/>
- </xsl:element>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="myCopy"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
-
- <xsl:variable name="sEmptyNamespace" select="string(document('')/*/namespace::*[name()=''])"/>
- <xsl:variable name="nNewSchema" select="number(substring-before(substring-after($sEmptyNamespace, 'http://www.developer.cognos.com/schemas/bmt/'), '/'))"/>
- <xsl:variable name="nOldSchema" select="$nNewSchema - 1"/>
- </xsl:stylesheet>
|