processDetails.xslt 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2011
  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. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" exclude-result-prefixes="xsd xsi bus">
  13. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  14. <xsl:variable name="objectType">
  15. <xsl:value-of select="/bus:queryResponse/*[local-name()='returns']/*[local-name()='item'][1]/*[local-name()='queryResult']/*[local-name()='item']/*[local-name()='parent']/*[local-name()='value']/*[local-name()='item']/*[local-name()='objectClass']/*[local-name()='value']"/>
  16. </xsl:variable>
  17. <xsl:template match="*[contains(@xsi:type,':historyDetailRequestArguments')" priority="1">
  18. <xsl:choose>
  19. <xsl:when test="$objectType = 'importDeployment' or $objectType = 'exportDeployment'">
  20. <xsl:element name="deploymentReport" namespace="{namespace-uri()}">
  21. <xsl:attribute name="type"><xsl:value-of select="@xsi:type"/></xsl:attribute>
  22. <xsl:copy-of select="./*[local-name()='options']/*"/>
  23. </xsl:element>
  24. </xsl:when>
  25. <xsl:otherwise>
  26. <xsl:copy-of select="."/>
  27. </xsl:otherwise>
  28. </xsl:choose>
  29. </xsl:template>
  30. <xsl:template match="*">
  31. <xsl:copy>
  32. <xsl:copy-of select="@*"/>
  33. <xsl:apply-templates/>
  34. </xsl:copy>
  35. </xsl:template>
  36. </xsl:stylesheet>