⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hdd_adv_prop.html

📁 暂时不定 我 也不知道 你怎么还非得 让 我说 就是这2样哦
💻 HTML
字号:
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  version="1.0">

<xsl:output
  method="html"
  version="4.0"
  encoding="UTF-8"
  omit-xml-declaration="yes"
  indent="yes"/>

<xsl:variable name="hexchars" select="'0123456789ABCDEF'"/>

<xsl:template name="convert-to-hex">
    <xsl:param name="number"/>
    <xsl:param name="result"/>
    <xsl:variable name="to-base-digit" select="substring($hexchars,$number mod 16 + 1,1)"/>
    <xsl:choose>
        <xsl:when test="$number >= 16">
            <xsl:call-template name="convert-to-hex">
                <xsl:with-param name="number" select="floor($number div 16)"/>
                <xsl:with-param name="result" select="concat($to-base-digit,$result)"/>
            </xsl:call-template>
        </xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="concat($to-base-digit,$result)"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>


<xsl:template match="/Root">

<html>
  <table>

    <tr>
      <!-- Object header -->
      <td colspan="2">
        <h2><xsl:value-of select="PropertyBag/Property[@name='PROPID_DISPLAYNAME']"/></h2>
        <img src="hline_gray"/>
      </td>
    </tr>
    <tr>
      <td align="right">
        <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_SIZESTRING']"/></b></nobr>
      </td>
      <td width="100%">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_SIZESTRING']"/></nobr>
      </td>
    </tr>
    <tr>
      <TD>
      </TD>
      <TD align="left">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_SIZESTRING_LONG']"/></nobr>
      </TD>
    </tr>
    <tr>
      <TD>
      </TD>
      <TD align="left">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_SIZEINSECTORS_STRING']"/></nobr>
      </TD>
    </tr>

    <tr>
      <td align="right">
        <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_HDDSIZE_STRING']"/></b></nobr>
      </td>
      <td width="100%">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSIZE_STRING']"/></nobr>
      </td>
    </tr>
    <tr>
      <TD>
      </TD>
      <TD align="left">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSIZE_STRINGLONG']"/></nobr>
      </TD>
    </tr>
    <tr>
      <TD>
      </TD>
      <TD align="left">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSIZESECTORS_STRING']"/></nobr>
      </TD>
    </tr>

    <tr>
      <td align="right">
        <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_CYLINDERS']"/></b></nobr>
      </td>
      <td>
        <xsl:variable name="CylDes" select="PropertyBag/Property[@name='PROPID_HDM_CYLINDERS']"/>
        <xsl:variable name="CylHex">
          <xsl:call-template name="convert-to-hex">
            <xsl:with-param name="number" select="$CylDes"/>
          </xsl:call-template>
        </xsl:variable>
        <nobr>0x<xsl:value-of select="$CylHex"/><nobr>
        <nobr>(<xsl:value-of select="$CylDes"/>)</nobr>
      </td>
    </tr>
    <tr>
      <td align="right">
        <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_HEADS']"/></b></nobr>
      </td>
      <td>
        <xsl:variable name="HeadsDes" select="PropertyBag/Property[@name='PROPID_HDM_HEADS']"/>
        <xsl:variable name="HeadsHex">
          <xsl:call-template name="convert-to-hex">
            <xsl:with-param name="number" select="$HeadsDes"/>
          </xsl:call-template>
        </xsl:variable>
        <nobr>0x<xsl:value-of select="$HeadsHex"/><nobr>
        <nobr>(<xsl:value-of select="$HeadsDes"/>)</nobr>
      </td>
    </tr>
    <tr>
      <td align="right">
        <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_SECTORSPERTRACK']"/></b></nobr>
      </td>
      <td>
        <xsl:variable name="SectorsDes" select="PropertyBag/Property[@name='PROPID_HDM_SECTORSPERTRACK']"/>
        <xsl:variable name="SectorsHex">
          <xsl:call-template name="convert-to-hex">
            <xsl:with-param name="number" select="$SectorsDes"/>
          </xsl:call-template>
        </xsl:variable>
        <nobr>0x<xsl:value-of select="$SectorsHex"/><nobr>
        <nobr>(<xsl:value-of select="$SectorsDes"/>)</nobr>
      </td>
    </tr>
    <tr>
      <TD align="right">
        <nobr><b><xsl:value-of select="PropertyList/Property[@propname='PROPID_HDM_HDDSECTORSIZE_STRING']"/></b></nobr>
      </TD>
      <TD align="left">
        <nobr><xsl:value-of select="PropertyBag/Property[@name='PROPID_HDM_HDDSECTORSIZE_STRING']"/></nobr>
      </TD>
    </tr>
<!--    
    <tr>
      <td colspan="2">
        <img src="hline_gray"/>
      </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <img src="C2CAA428-F14A-48d2-93D9-AA7580338E78"/>
      </td>
    </tr>
-->
  </table>

</xsl:template>
</xsl:stylesheet>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -