functionTreeResponse.xts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: AGS
  5. (C) Copyright IBM Corp. 2005, 2008
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <xts:morphlet resolverBase="prompting" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml" requiredCapability="canUseEventStudio">
  9. <!--
  10. ===============================================================================================
  11. appendDocument - add the results of the requests into the right place
  12. ===============================================================================================
  13. -->
  14. <xts:block id="appendDocument" mode="output" processor="XSLT" type="exec" mimeType="text/xml">
  15. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  16. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  17. <xsl:template match="/root">
  18. <xsl:variable name="CRLF">
  19. <xsl:text>&#xA;</xsl:text>
  20. </xsl:variable>
  21. <asyncReply>
  22. &lt;functionTree&gt;
  23. <xsl:choose>
  24. <xsl:when test="contains(./SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:metadata, '&lt;?xml')">
  25. <xsl:value-of select="xtsext:replace(substring-after(./SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:metadata, '?&gt;'), string($CRLF), string('&amp;#xA;'), false)"/>
  26. </xsl:when>
  27. <xsl:otherwise>
  28. <xsl:value-of select="xtsext:replace(./SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item/bus:metadata, string($CRLF), string('&amp;#xA;'), false)"/>
  29. </xsl:otherwise>
  30. </xsl:choose>
  31. &lt;/functionTree&gt;
  32. </asyncReply>
  33. </xsl:template>
  34. </xsl:stylesheet>
  35. </xts:block>
  36. </xts:morphlet>