gen-GetMultipleResourceProperties.xslt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. <!--
  13. Generates a list of properties using the capability passed in and the metadata
  14. <root>
  15. <metadata>
  16. metadata from the server
  17. </metadata>
  18. <capability>
  19. the type of properties we want to get
  20. </capability>
  21. </root>
  22. -->
  23. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:nemo="http://developer.cognos.com/nemo" exclude-result-prefixes="xsl wsrf-rp nemo">
  24. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
  25. <xsl:template match="/root">
  26. <wsrf-rp:GetMultipleResourceProperties>
  27. <xsl:for-each select="/root/capability">
  28. <xsl:variable name="capability" select="."/>
  29. <xsl:for-each select="/root/metadata/wsrf-rp:GetMultipleResourcePropertiesResponse/nemo:MetadataDescriptor/nemo:Property[nemo:Capability = string($capability) or not($capability)]">
  30. <wsrf-rp:ResourceProperty>
  31. <xsl:value-of select="nemo:Name"/>
  32. </wsrf-rp:ResourceProperty>
  33. </xsl:for-each>
  34. </xsl:for-each>
  35. </wsrf-rp:GetMultipleResourceProperties>
  36. </xsl:template>
  37. </xsl:stylesheet>