<?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:template name="PropCell">
  <xsl:param name="PropName"/>
  <xsl:param name="CheckNull"/>
  <xsl:param name="CheckFSName"/>
  <xsl:param name="WordWrap" select="0"/>

  <!-- #30570 Change displaying of 128MB GPT partition -->
  <xsl:variable name="FSName" select="PropertyBag/Property[@name='PartitionProperties::FileSystemRawText']"/>
  <xsl:variable 
    name="HasFSProps" 
    select="$FSName != 'UNKNOWN' and 
      	$FSName != 'INVALID' and 
      	$FSName != 'FREE' and 
      	$FSName != 'NOTFORMATTED' and 
      	$FSName != 'LSWAP' and
      	$FSName != 'LSWAP2' and
      	$FSName != 'BACKUPCAPSULE' and
      	$FSName != 'SYSRESERVED'"
    />

  <!-- #30570 Change displaying of 128MB GPT partition -->
  <xsl:if test="PropertyBag/Property[@name=$PropName] and 
    (not(boolean($CheckNull)) or (number(PropertyBag/Property[@name=$PropName]) != 0 and string-length(PropertyBag/Property[@name=$PropName]) != 0)) and
    (not(boolean($CheckFSName)) or boolean($HasFSProps))">
    <tr>
      <td align="right">
        <nobr><b><xsl:value-of select="ImplicitCommands/Property[@propname=$PropName]"/></b></nobr>
      </td>
      <xsl:choose>
        <xsl:when test="ImplicitCommands/Property[@propname=$PropName]/@action">
          <td width="100%">
            <a>
              <xsl:attribute name="href">
                <xsl:value-of select="ImplicitCommands/Property[@propname=$PropName]/@action"/>
              </xsl:attribute>
              <nobr><xsl:value-of select="PropertyBag/Property[@name=$PropName]"/></nobr>
            </a>
          </td>
        </xsl:when>      
        <xsl:otherwise>
          <td width="100%">
            <xsl:choose>
              <xsl:when test="number($WordWrap) != 0"><xsl:value-of select="PropertyBag/Property[@name=$PropName]"/></xsl:when>
              <xsl:otherwise><nobr><xsl:value-of select="PropertyBag/Property[@name=$PropName]"/></nobr></xsl:otherwise>
            </xsl:choose>
          </td>
        </xsl:otherwise>
      </xsl:choose>
    </tr>
  </xsl:if>
</xsl:template>

<xsl:template name="CommandTable">
  <!-- Command hyperlinks -->
  <table border="0" cellspacing="4">
     <xsl:for-each select="Commands/Command">
       <tr>
<!--
         <td valign="middle">
           <xsl:choose>
             <xsl:when test="Image">
               <img Width="16" Height="16"><xsl:attribute name="src"><xsl:value-of select="Image"/></xsl:attribute></img>
             </xsl:when>
           </xsl:choose>
         </td>
         
-->           
         <td width="100%">
           <a>
             <xsl:attribute name="href"><xsl:value-of select="Action"/></xsl:attribute>
             <font size="+1"><xsl:value-of select="Text"/></font>
             
           </a>
<!--           
           <br/>
           <xsl:value-of select="TipText" disable-output-escaping="yes"/>
-->           
         </td>
       </tr>
     </xsl:for-each>
  </table>
</xsl:template>

</xsl:stylesheet>
