build-policies.xslt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  13. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  14. <xsl:template match="cm:policies">
  15. <xsl:copy>
  16. <xsl:copy-of select="@*"/>
  17. <xsl:apply-templates/>
  18. </xsl:copy>
  19. </xsl:template>
  20. <xsl:template match="credential">
  21. <xsl:for-each select="*">
  22. <cm:policy>
  23. <cm:securityObject>
  24. <cm:searchPath>
  25. <xsl:value-of select="cm:searchPath"/>
  26. </cm:searchPath>
  27. </cm:securityObject>
  28. <cm:permission name="execute" access="grant"/>
  29. </cm:policy>
  30. </xsl:for-each>
  31. </xsl:template>
  32. <xsl:template match="*">
  33. <xsl:copy>
  34. <xsl:copy-of select="@*"/>
  35. <xsl:apply-templates/>
  36. </xsl:copy>
  37. </xsl:template>
  38. </xsl:stylesheet>