123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?xml version="1.0"?>
- <xsl:stylesheet xmlns="http://www.developer.cognos.com/schemas/bmt/54/0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <xsl:include href="fmmd_generalTemplates.xsl"/>
- <xsl:strip-space elements="*"/>
- <xsl:output encoding="utf-8" method="xml" indent="no"/>
-
-
-
- <xsl:template match="*[local-name()='levelShortcut']"/>
-
-
-
- <xsl:template match="*[local-name()='queryItem']/*[local-name()='role']"/>
-
- <xsl:template match="*[local-name()='queryItem' and *[local-name()='role' and .='caption']]">
- <xsl:variable name="roles">
- <xsl:element name="roles">
- <xsl:element name="role"><xsl:attribute name="locale"><xsl:value-of select="/*[local-name()='project']/*[local-name()='defaultLocale']"/></xsl:attribute>_memberCaption</xsl:element>
- </xsl:element>
- </xsl:variable>
-
- <xsl:element name="queryItem">
- <xsl:call-template name="myCopyAttributes"/>
- <xsl:for-each select="node()">
- <xsl:choose>
- <xsl:when test="*[local-name()='collationSequenceName']">
- <xsl:copy-of select="$roles"/>
- <xsl:call-template name="myCopy"/>
- </xsl:when>
- <xsl:when test="*[local-name()='collationSequenceLevel'] and not(../*[local-name()='collationSequenceName'])">
- <xsl:copy-of select="$roles"/>
- <xsl:call-template name="myCopy"/>
- </xsl:when>
- <xsl:when test="*[local-name()='originalCollationSequenceName'] and not(../*[local-name()='collationSequenceLevel']) and not(../*[local-name()='collationSequenceName'])">
- <xsl:copy-of select="$roles"/>
- <xsl:call-template name="myCopy"/>
- </xsl:when>
- <xsl:when test="*[local-name()='originalEncodingName'] and not(../*[local-name()='originalCollationSequenceName']) and not(../*[local-name()='collationSequenceLevel']) and not(../*[local-name()='collationSequenceName'])">
- <xsl:copy-of select="$roles"/>
- <xsl:call-template name="myCopy"/>
- </xsl:when>
- <xsl:when test="position() = last()">
- <xsl:apply-templates select="."/>
- <xsl:copy-of select="$roles"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:element>
- </xsl:template>
-
-
-
- <xsl:template match="*[local-name()='calculation']/*[local-name()='dimensions']">
- <xsl:call-template name="myCopy">
- <xsl:with-param name="elemName">hierarchies</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
-
-
-
- <xsl:template match="*[local-name()='packages']/*[local-name()='package']/*[local-name()='maxVersions' and . = '']"/>
-
-
-
- <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>
|