Source code of Windows XP (NT5)
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.

54 lines
1.8 KiB

  1. <?xml version='1.0' ?>
  2. <!-- Copyright (c) 2001 Microsoft Corporation -->
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  4. <xsl:param name="sortby"/>
  5. <xsl:param name="title"/>
  6. <xsl:param name="datatype" select="'text'"/>
  7. <xsl:template match="COMMAND">
  8. <table border="1">
  9. <tr style="background-color:#a0a0ff;font:10pt Tahoma;font-weight:bold;" align="left">
  10. <td>Node</td>
  11. <xsl:for-each select="RESULTS[1]/CIM/INSTANCE[1]/PROPERTY">
  12. <td>
  13. <xsl:value-of select="@NAME"/>
  14. </td>
  15. </xsl:for-each>
  16. </tr>
  17. <tr style="background-color:#e0f0f0;font:10pt Tahoma;">
  18. <xsl:for-each select="RESULTS/CIM/INSTANCE">
  19. <xsl:sort select="PROPERTY[@NAME=$sortby]" data-type="{$datatype}"/>
  20. <tr style="background-color:#f0f0f0;font:10pt Tahoma;" align="right">
  21. <td align="left"><xsl:value-of select="../../@NODE"/></td>
  22. <xsl:for-each select="PROPERTY">
  23. <xsl:choose>
  24. <xsl:when test="@TYPE='uint32'">
  25. <td align="right">
  26. <xsl:value-of select="format-number(number(.),'###,###,###,###')"/><span style="height:1px;overflow-y:hidden">.</span></td>
  27. </xsl:when>
  28. <xsl:when test="@TYPE='uint64'">
  29. <td align="right">
  30. <xsl:value-of select="format-number(number(.),'###,###,###,###')"/><span style="height:1px;overflow-y:hidden">.</span></td>
  31. </xsl:when>
  32. <xsl:otherwise>
  33. <td align="left">
  34. <xsl:value-of select="."/><span style="height:1px;overflow-y:hidden">.</span></td>
  35. </xsl:otherwise>
  36. </xsl:choose>
  37. </xsl:for-each>
  38. </tr>
  39. </xsl:for-each>
  40. </tr>
  41. </table>
  42. </xsl:template>
  43. <xsl:template match="/" >
  44. <html>
  45. <H1><xsl:value-of select="$title" /></H1>
  46. <H3><xsl:value-of select="count(//CIM/INSTANCE)"/> Instances of <xsl:value-of select="COMMAND/REQUEST/COMMANDLINECOMPONENTS/FRIENDLYNAME"/></H3>
  47. <xsl:apply-templates select="COMMAND"/>
  48. </html>
  49. </xsl:template>
  50. </xsl:stylesheet>