m_GetResourceProperty.xts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cogadmin
  5. (C) Copyright IBM Corp. 2005, 2010
  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. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/">
  13. <xts:block id="producers" type="exec" mode="interpret" processor="XSLT">
  14. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:nemo="http://developer.cognos.com/nemo" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
  15. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  16. <xsl:template match="/">
  17. <xsl:variable name="resourceTypeTemp" select="substring-after(/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Header/nemo:cogadminHeader/nemo:ResourceIdentifier,':') "/>
  18. <xsl:variable name="resourceType">
  19. <xsl:choose>
  20. <xsl:when test="contains($resourceTypeTemp, ':')">
  21. <xsl:value-of select="substring-before($resourceTypeTemp, ':')"/>
  22. </xsl:when>
  23. <xsl:otherwise>
  24. <xsl:value-of select="$resourceTypeTemp"/>
  25. </xsl:otherwise>
  26. </xsl:choose>
  27. </xsl:variable>
  28. <xsl:variable name="propertyName" select="/root/envelope/SOAP-ENV:Envelope/SOAP-ENV:Body/wsrf-rp:GetResourceProperty/text()"/>
  29. <xts:sequence>
  30. <xts:append select="/root/output">
  31. <xos:part>
  32. <xos:entityHeader>
  33. <xos:param name="Content-type">text/xml</xos:param>
  34. </xos:entityHeader>
  35. <xos:entityBody>
  36. <xts:request protocol="GetResourceProperty" responseEnvelope="true">
  37. <xsl:copy-of select="/root/envelope/*[1]"/>
  38. </xts:request>
  39. </xos:entityBody>
  40. </xos:part>
  41. </xts:append>
  42. </xts:sequence>
  43. </xsl:template>
  44. </xsl:stylesheet>
  45. </xts:block>
  46. </xts:morphlet>