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.

116 lines
4.2 KiB

  1. <?xml version="1.0"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  3. <xsl:template match="/">
  4. <DIV STYLE="padding:.3in .1in .3in .3in; font-family:Arial Black; background-color:maroon">
  5. <xsl:for-each select="CIM//INSTANCE">
  6. <TABLE>
  7. <TR>
  8. <TD COLSPAN="2" WIDTH="200">
  9. <CENTER><IMG src="cpu.jpg" width="100" height="100"></IMG></CENTER>
  10. </TD>
  11. <TD STYLE="padding-left:1em">
  12. <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow">
  13. <SPAN STYLE="color:white"><xsl:value-of select="PROPERTY[@NAME='DeviceID']/VALUE"/></SPAN>
  14. </DIV><P/>
  15. <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow">
  16. <SPAN STYLE="color:white"><xsl:value-of select="PROPERTY[@NAME='Name']/VALUE"/></SPAN>
  17. </DIV><P/>
  18. <DIV STYLE="margin-left:2em; text-indent:-1.5em; line-height:80%; font-size:18pt; color:yellow">
  19. <SPAN STYLE="color:white"><xsl:apply-templates select="PROPERTY[@NAME='Availability']"/></SPAN>
  20. </DIV>
  21. </TD>
  22. </TR>
  23. <TR>
  24. <TD><DIV STYLE="color:white; font:10pt. Verdana; font-style:italic; font-weight:normal"><xsl:value-of select="PROPERTY[@NAME='FileSystem']/VALUE"/></DIV></TD>
  25. <TD><DIV STYLE="text-align:right; color:white; font:10pt. Verdana; font-style:italic; font-weight:normal"><xsl:value-of select="PROPERTY[@NAME='VolumeSerialNumber']/VALUE"/></DIV></TD>
  26. <TD></TD>
  27. </TR>
  28. <TR>
  29. <TD COLSPAN="2">
  30. <DIV STYLE="margin:2px; padding:0em .5em; background-color:teal; color:white">
  31. <xsl:value-of select="PROPERTY[@NAME='CurrentClockSpeed']/VALUE"/> MHz
  32. </DIV>
  33. <DIV STYLE="margin:2px; padding:0em .5em; background-color:teal; color:white">
  34. <xsl:value-of select="PROPERTY[@NAME='AddressWidth']/VALUE"/> Bit
  35. </DIV>
  36. <DIV STYLE="margin:2px; padding:0em .5em; background-color:teal; color:white">
  37. <xsl:value-of select="PROPERTY[@NAME='L2CacheSize']/VALUE"/> L2 Cache
  38. </DIV>
  39. </TD>
  40. <TD STYLE="text-align:right; font:10pt Verdana; font-style:italic; color:yellow">
  41. <DIV STYLE="margin-top:.5em; font-weight:bold">
  42. <xsl:apply-templates select="PROPERTY[@NAME='PowerManagementSupported']"/>
  43. </DIV>
  44. </TD>
  45. </TR>
  46. </TABLE>
  47. </xsl:for-each>
  48. </DIV>
  49. </xsl:template>
  50. <xsl:template match="PROPERTY[@NAME='PowerManagementSupported']">
  51. <xsl:choose>
  52. <xsl:when test="VALUE[. $eq$ 'TRUE']">This processor supports power management</xsl:when>
  53. <xsl:otherwise>This processor does NOT support power management</xsl:otherwise>
  54. </xsl:choose>
  55. </xsl:template>
  56. <xsl:template match="PROPERTY[@NAME='Availability']">
  57. <xsl:choose>
  58. <xsl:when test="VALUE[. $eq$ '1']">
  59. Other
  60. </xsl:when>
  61. <xsl:when test="VALUE[. $eq$ '2']">
  62. Unknown
  63. </xsl:when>
  64. <xsl:when test="VALUE[. $eq$ '3']">
  65. Running/Full Power
  66. </xsl:when>
  67. <xsl:when test="VALUE[. $eq$ '4']">
  68. Warning
  69. </xsl:when>
  70. <xsl:when test="VALUE[. $eq$ '5']">
  71. In Test
  72. </xsl:when>
  73. <xsl:when test="VALUE[. $eq$ '6']">
  74. Not Applicable
  75. </xsl:when>
  76. <xsl:when test="VALUE[. $eq$ '7']">
  77. Power Off
  78. </xsl:when>
  79. <xsl:when test="VALUE[. $eq$ '8']">
  80. Off Line
  81. </xsl:when>
  82. <xsl:when test="VALUE[. $eq$ '9']">
  83. Off Duty
  84. </xsl:when>
  85. <xsl:when test="VALUE[. $eq$ '10']">
  86. Degraded
  87. </xsl:when>
  88. <xsl:when test="VALUE[. $eq$ '11']">
  89. Not Installed
  90. </xsl:when>
  91. <xsl:when test="VALUE[. $eq$ '12']">
  92. Install Error
  93. </xsl:when>
  94. <xsl:when test="VALUE[. $eq$ '13']">
  95. Power Save - Unknown
  96. </xsl:when>
  97. <xsl:when test="VALUE[. $eq$ '14']">
  98. Power Save - Low Power Mode
  99. </xsl:when>
  100. <xsl:when test="VALUE[. $eq$ '15']">
  101. Power Save - Standby
  102. </xsl:when>
  103. <xsl:when test="VALUE[. $eq$ '16']">
  104. Power Cycle
  105. </xsl:when>
  106. <xsl:when test="VALUE[. $eq$ '17']">
  107. Power Save - Warning
  108. </xsl:when>
  109. <xsl:otherwise>Unknown State</xsl:otherwise>
  110. </xsl:choose>
  111. </xsl:template>
  112. </xsl:stylesheet>