addStepGUIDs.xslt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. NOTE: The logic to determine the order of the queries MUST match the logic found in dt:generateInitialUIHelpers
  14. if checkUIHelpers is true, then only build the CM query if the associated UIHelper is empty.
  15. -->
  16. <xsl:stylesheet version="1.0"
  17. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  18. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  19. exclude-result-prefixes="xsl">
  20. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  21. <xsl:template match="/" priority="1">
  22. <xsl:apply-templates select="*"/>
  23. </xsl:template>
  24. <xsl:template match="*[local-name()='queryReply']">
  25. <xsl:apply-templates select="*"/>
  26. </xsl:template>
  27. <xsl:template match="*[local-name()='jobStepDefinition']" priority="1">
  28. <xsl:copy>
  29. <xsl:copy-of select="node()"/>
  30. <x:guid xmlns:x="x">
  31. <xsl:value-of select="xtsext:generateGUID()"/>
  32. </x:guid>
  33. </xsl:copy>
  34. </xsl:template>
  35. <!-- match all unmatched nodes -->
  36. <xsl:template match="node()" priority="0">
  37. <xsl:element name="{name()}" namespace="{namespace-uri()}">
  38. <xsl:copy-of select="@*"/>
  39. <xsl:apply-templates/>
  40. </xsl:element>
  41. </xsl:template>
  42. <!-- copy just the text -->
  43. <xsl:template match="text()" priority="0">
  44. <xsl:copy-of select="."/>
  45. </xsl:template>
  46. </xsl:stylesheet>