rsupgrade.xts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: rspecupgrade
  5. (C) Copyright IBM Corp. 2005, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure
  7. restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <!-- COPYRIGHT_DATA { 'YEAR':[2005, 2009], 'RELEASE':['colorado_wave1'], 'VISIBLE':'YES', 'COMPONENT':'rspecupgrade' }-->
  10. <!--All lines above the COPYRIGHT_DATA line will be replaced when copyright notices are generated. -->
  11. <!-- This morphlet is used to upgrade report specifications to a new version.
  12. The input is a SOAP message that contains the report to be upgraded.
  13. The report is escaped with &lt; and &gt; instead of < and >.
  14. The result is the upgraded report, and is not escaped.
  15. Changing the input is an API change that affects:
  16. * RSVP
  17. * Upgrade Manager
  18. -->
  19. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/">
  20. <xts:block id="return" processor="XSLT" type="exec" mode="output" mimeType="text/xml">
  21. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:rsupgrade="xalan://com.cognos.rspecupgrade.rsupgrade.morphlet.UpgradeReportSpecificationMorphlet" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rns1="http://developer.cognos.com/schemas/reportservice/upgrade/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  22. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  23. <!--
  24. * Upgrade a report specification.
  25. -->
  26. <xsl:template match="/">
  27. <xsl:variable name="var_locale" select="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:userPreferenceVars/item/name[normalize-space(text())='productLocale']/../value/text()"/>
  28. <xsl:apply-templates select="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Body">
  29. <xsl:with-param name="p_locale" select="$var_locale"/>
  30. </xsl:apply-templates>
  31. </xsl:template>
  32. <xsl:template match="SOAP-ENV:Body">
  33. <xsl:param name="p_locale"/>
  34. <xsl:variable name="var_properties" select="rns1:upgrade/rns1:properties/text()"/>
  35. <xsl:variable name="var_report" select="rns1:upgrade/text()"/>
  36. <xsl:value-of select="rsupgrade:upgrade5($var_report, $p_locale, $var_properties)" disable-output-escaping="yes"/>
  37. </xsl:template>
  38. </xsl:stylesheet>
  39. </xts:block>
  40. </xts:morphlet>