launchRS.xts 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio, canUseReportStudio">
  13. <xts:block id="querySessionInCM" mode="interpret" processor="XSLT" type="exec">
  14. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  15. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  16. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  17. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  18. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  19. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  20. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  21. exclude-result-prefixes="xsl xts send bus xsi send">
  22. <xsl:output method="xml" version="1.0" encoding="UTF-8"/>
  23. <xsl:template match="/">
  24. <xts:sequence>
  25. <xts:append>
  26. <send:request provider="warp" asText="true" responseEnvelope="true" soapAction="http://www.ibm.com/xmlns/prod/cognos/contentManagerService/201404/" faultBlock="faultHandler">
  27. <cm:add xmlns:cm="http://developer.cognos.com/schemas/bibus/3/">
  28. <search>~~</search>
  29. <objects>
  30. <item xsi:type="bus:query">
  31. <searchPath>
  32. <value>~~</value>
  33. </searchPath>
  34. <defaultName>
  35. <value>query</value>
  36. </defaultName>
  37. <specification>
  38. <xsl:choose>
  39. <xsl:when test="starts-with(string(/root/env/param[@name='xxSpec']),'&lt;')">
  40. <value xsi:type="xs:string"><xsl:value-of select="/root/env/param[@name='xxSpec']"/></value>
  41. </xsl:when>
  42. <xsl:otherwise>
  43. <value xsi:type="xs:string"><xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='xxSpec']))" disable-output-escaping="yes"/></value>
  44. </xsl:otherwise>
  45. </xsl:choose>
  46. </specification>
  47. </item>
  48. </objects>
  49. <options>
  50. <updateAction>update</updateAction>
  51. </options>
  52. </cm:add>
  53. </send:request>
  54. </xts:append>
  55. </xts:sequence>
  56. </xsl:template>
  57. <xsl:template match="*">
  58. <xsl:copy>
  59. <xsl:copy-of select="@*"/>
  60. <xsl:apply-templates/>
  61. </xsl:copy>
  62. </xsl:template>
  63. </xsl:stylesheet>
  64. </xts:block>
  65. <!--
  66. Process Response
  67. -->
  68. <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/plain" dependency="querySessionInCM">
  69. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  70. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  71. exclude-result-prefixes="bus">
  72. <xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
  73. <xsl:template match="/">
  74. <xsl:choose>
  75. <xsl:when test="/root/logonFault">
  76. <xsl:text/>FAULT;timeout<xsl:text/>
  77. </xsl:when>
  78. <xsl:otherwise>
  79. <xsl:value-of select="/root/*[local-name()='Envelope']/*[local-name()='Body']/*/*/*/*[local-name()='searchPath']/*[local-name()='value']"/>
  80. </xsl:otherwise>
  81. </xsl:choose>
  82. </xsl:template>
  83. </xsl:stylesheet>
  84. </xts:block>
  85. <xts:block id="faultHandler" path="qs/logicsheets/faultHandler.xsl" type="fault" processor="XSLT"/>
  86. </xts:morphlet>