Advertisement
Guest User

Untitled

a guest
Apr 7th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet exclude-result-prefixes="query cmd dncv soap-env envelope" version="1.0" xmlns:cmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor" xmlns:dncv="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.DNConverter" xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  2. <!-- parameters passed in from the Identity Manager engine -->
  3. <xsl:param name="srcQueryProcessor"/>
  4. <xsl:param name="destQueryProcessor"/>
  5. <xsl:param name="srcCommandProcessor"/>
  6. <xsl:param name="destCommandProcessor"/>
  7. <xsl:param name="dnConverter"/>
  8. <xsl:param name="fromNds"/>
  9. <!-- This is for testing the stylesheet outside of Identity Manager so things are pretty to look at -->
  10. <xsl:strip-space elements="*"/>
  11. <xsl:preserve-space elements="value component password check-password"/>
  12. <xsl:output indent="yes" method="xml"/>
  13. <!-- ***************** -->
  14. <!-- Add SOAP Header -->
  15. <!-- ***************** -->
  16.  
  17. <xsl:template match="source">
  18. </xsl:template>
  19.  
  20. <xsl:template match="add|modify|delete|rename|move|query|output/status">
  21. <xsl:choose>
  22. <xsl:when test="operation-data/return-to-me[@command='heartbeat']">
  23. <xsl:message>Output: Do not add SOAP header to heartbeat</xsl:message>
  24. <xsl:copy>
  25. <xsl:apply-templates select="node()|@*"/>
  26. </xsl:copy>
  27. </xsl:when>
  28. <xsl:when test="operation-data/return-to-me[@command='remote-loader-query']">
  29. <xsl:message>Output: Do not add SOAP header to remote loader query</xsl:message>
  30. <xsl:copy>
  31. <xsl:apply-templates select="node()|@*"/>
  32. </xsl:copy>
  33. </xsl:when>
  34. <xsl:when test="operation-data/return-to-me[@command='check-password']">
  35. <xsl:message>Output: Do not add SOAP header to check-password</xsl:message>
  36. <xsl:copy>
  37. <xsl:apply-templates select="node()|@*"/>
  38. </xsl:copy>
  39. </xsl:when>
  40. <xsl:otherwise>
  41. <xsl:message>Output: Add SOAP Headers</xsl:message>
  42. <soap12:envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  43. <soap12:Body>
  44. <xsl:apply-templates select="node()"/>
  45. </soap12:Body>
  46. </soap12:envelope>
  47. </xsl:otherwise>
  48. </xsl:choose>
  49. </xsl:template>
  50.  
  51. <xsl:template match="nds|input">
  52. <xsl:apply-templates select="@*|node()"/>
  53. </xsl:template>
  54.  
  55. <!-- identity transformation template -->
  56. <!-- in the absence of any other templates this will cause -->
  57. <!-- the stylesheet to copy the input through unchanged to the output -->
  58. <xsl:template match="node()|@*">
  59. <xsl:copy>
  60. <xsl:apply-templates select="node()|@*"/>
  61. </xsl:copy>
  62. </xsl:template>
  63. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement