QSUpgrade.xsl 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: qs
  5. (C) Copyright IBM Corp. 2001, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. * Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. * Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. *
  12. -->
  13. <!--
  14. *
  15. *
  16. * This stylesheet generates a Bering mini query from a baltic mini query.
  17. *
  18. -->
  19. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:baltic="http://developer.cognos.com/schemas/report/1/" xmlns:date="http://exslt.org/dates-and-times" xmlns:exsl="http://exslt.org/common" xmlns:xalan="http://xml.apache.org/xalan" xmlns:java="http://xml.apache.org/xalan/java" extension-element-prefixes="xalan date exsl" exclude-result-prefixes="xalan java baltic date exsl">
  20. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" xalan:indent-amount="2" omit-xml-declaration="yes"/>
  21. <xsl:template match="/CRQReport">
  22. <xsl:choose>
  23. <xsl:when test="./@majorVersion &gt; 0 and ./@majorVersion &lt; 2">
  24. <xsl:element name="CRQReport">
  25. <xsl:for-each select="@*[name()!='majorVersion' and name()!='minorVersion']">
  26. <xsl:attribute name="{name()}"><xsl:value-of select="."/></xsl:attribute>
  27. </xsl:for-each>
  28. <xsl:attribute name="majorVersion">2</xsl:attribute>
  29. <xsl:attribute name="minorVersion">0</xsl:attribute>
  30. <!-- explcity turn off drill when upgrading reports -->
  31. <xsl:attribute name="enableDrill">false</xsl:attribute>
  32. <xsl:copy-of select="./*"/>
  33. </xsl:element>
  34. </xsl:when>
  35. <xsl:otherwise>
  36. <xsl:copy-of select="."/>
  37. </xsl:otherwise>
  38. </xsl:choose>
  39. </xsl:template>
  40. </xsl:stylesheet>