CMResponseToCCLConfig.xsl 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: fmmd
  5. (C) Copyright IBM Corp. 2003, 2010
  6. US Government Users Restricted Rights - Use, duplication or disclosure
  7. restricted by GSA ADP Schedule Contract with IBM Corp.
  8. -->
  9. <xsl:stylesheet version="1.0"
  10. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  11. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  12. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  13. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xmlns:rns1="http://developer.cognos.com/schemas/contentManagerService/1"
  16. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  17. <xsl:template match="/">
  18. <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  19. <xsl:apply-templates select="SOAP-ENV:Envelope/SOAP-ENV:Body/rns1:queryResponse/bus:result/item"/>
  20. </SOAP-ENV:Envelope>
  21. </xsl:template>
  22. <xsl:template match="bus:result/item">
  23. <queryResult>
  24. <item>
  25. <xsl:apply-templates select="bus:contentLocaleMap"/>
  26. <xsl:apply-templates select="bus:productLocaleMap"/>
  27. <xsl:apply-templates select="bus:supportedContentLocales"/>
  28. <xsl:apply-templates select="bus:supportedCurrencies"/>
  29. </item>
  30. </queryResult>
  31. </xsl:template>
  32. <xsl:template match="bus:contentLocaleMap">
  33. <contentLocaleMap>
  34. <value xsi:type="SOAP-ENC:Array">
  35. <xsl:attribute name="SOAP-ENC:arrayType">
  36. <xsl:value-of select="bus:value/@SOAP-ENC:arrayType" />
  37. </xsl:attribute>
  38. <xsl:for-each select="bus:value/item">
  39. <item>
  40. <key xsi:type="xs:string">
  41. <xsl:value-of select="bus:key"/>
  42. </key>
  43. <value xsi:type="xs:string">
  44. <xsl:value-of select="bus:value"/>
  45. </value>
  46. </item>
  47. </xsl:for-each>
  48. </value>
  49. </contentLocaleMap>
  50. </xsl:template>
  51. <xsl:template match="bus:productLocaleMap">
  52. <productLocaleMap>
  53. <value xsi:type="SOAP-ENC:Array">
  54. <xsl:attribute name="SOAP-ENC:arrayType">
  55. <xsl:value-of select="bus:value/@SOAP-ENC:arrayType" />
  56. </xsl:attribute>
  57. <xsl:for-each select="bus:value/item">
  58. <item>
  59. <key xsi:type="xs:string">
  60. <xsl:value-of select="bus:key"/>
  61. </key>
  62. <value xsi:type="xs:string">
  63. <xsl:value-of select="bus:value"/>
  64. </value>
  65. </item>
  66. </xsl:for-each>
  67. </value>
  68. </productLocaleMap>
  69. </xsl:template>
  70. <xsl:template match="bus:supportedCurrencies">
  71. <supportedCurrencies>
  72. <value xsi:type="SOAP-ENC:Array">
  73. <xsl:attribute name="SOAP-ENC:arrayType">
  74. <xsl:value-of select="bus:value/@SOAP-ENC:arrayType" />
  75. </xsl:attribute>
  76. <xsl:for-each select="bus:value/item">
  77. <item>
  78. <xsl:value-of select="current()"/>
  79. </item>
  80. </xsl:for-each>
  81. </value>
  82. </supportedCurrencies>
  83. </xsl:template>
  84. <xsl:template match="bus:supportedContentLocales">
  85. <supportedContentLocales xsi:type="bus:languageArrayProp">
  86. <value xsi:type="SOAP-ENC:Array">
  87. <xsl:attribute name="SOAP-ENC:arrayType">
  88. <xsl:value-of select="bus:value/@SOAP-ENC:arrayType" />
  89. </xsl:attribute>
  90. <xsl:for-each select="bus:value/item">
  91. <item xsi:type="xs:string"><xsl:value-of select="current()"/></item>
  92. </xsl:for-each>
  93. </value>
  94. </supportedContentLocales>
  95. </xsl:template>
  96. </xsl:stylesheet>