Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3. <!-- Root template selects all children of the CIM/DECLARATIONS tag -->
  4. <xsl:template match="/">
  5. <SCRIPT>
  6. function ExecuteMethod(theMethodName)
  7. {
  8. alert("Do you want to Execute the method " + theMethodName + "() ?");
  9. }
  10. </SCRIPT>
  11. <xsl:apply-templates select="CIM//CLASS"/>
  12. </xsl:template>
  13. <xsl:template match="CLASS">
  14. <B>Methods for the class <xsl:value-of select="@NAME"/></B>
  15. <xsl:apply-templates/>
  16. </xsl:template>
  17. <!-- METHOD template formats a single CIM method -->
  18. <xsl:template match="METHOD">
  19. <TABLE STYLE="border:1px solid black">
  20. <xsl:element name="BUTTON">
  21. <xsl:attribute name="id"><xsl:value-of select="@NAME"/></xsl:attribute>
  22. <xsl:attribute name="onClick">ExecuteMethod('Hello')</xsl:attribute>
  23. <xsl:value-of select="@NAME"/>
  24. </xsl:element>
  25. <TR STYLE="font-size:12pt; font-family:Verdana; font-weight:bold; text-decoration:underline">
  26. <TD>Name</TD>
  27. <TD>Type</TD>
  28. </TR>
  29. <xsl:for-each select="METHODPARAMETER">
  30. <TR STYLE="font-family:Verdana; font-size:12pt; padding:0px 6px">
  31. <TD><xsl:value-of select="@NAME"/></TD>
  32. <xsl:for-each select="PARAMETER">
  33. <TD><xsl:value-of select="@TYPE"/></TD>
  34. </xsl:for-each>
  35. </TR>
  36. </xsl:for-each>
  37. </TABLE>
  38. </xsl:template>
  39. </xsl:stylesheet>