update-portal-prefs.xsl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. <!--
  13. ===============================================================================================
  14. Logic sheet for dealing with "special" properties stored in CM.
  15. ===============================================================================================
  16. -->
  17. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  18. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  19. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  20. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  21. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  22. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  23. exclude-result-prefixes="xsl xts cm xtsext">
  24. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  25. <xsl:template match="/">
  26. <cm:update xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  27. <cm:objects>
  28. <cm:account>
  29. <cm:searchPath>~</cm:searchPath>
  30. <options xsi:type="cm:optionArrayProp">
  31. <value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:option[{count(/cm:queryResponse//cm:account/options/value/item)}]">
  32. <xsl:for-each select="/cm:queryResponse//cm:account/options/value/item[name!='showOptionSummary']">
  33. <xsl:copy-of select="."/>
  34. </xsl:for-each>
  35. <item xsi:type="cm:portalOptionBoolean">
  36. <name xsi:type="cm:portalOptionEnum">showOptionSummary</name>
  37. <value xsi:type="xsd:boolean">false</value>
  38. </item>
  39. </value>
  40. </options>
  41. </cm:account>
  42. </cm:objects>
  43. </cm:update>
  44. </xsl:template>
  45. </xsl:stylesheet>