<?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>
        <body>
            <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 != 'UNFORM' and 
                    $FSName != 'LSWAP' and
                    $FSName != 'LSWAP1' and
                    $FSName != 'BACKUPCAPSULE' and
                    $FSName != 'SYSRESERVED' and
                    $FSName != 'Bitlocked'"
            /> 

            <!--<table style="margin-left:0px" width="100%" align="left" cellspacing="0" cellpadding="20">-->
            <table style="margin-left:0px"  align="left">
                <tr>
                    <td>
                        <span style="color: #7c7d7d;">
                        <nobr>QT_TRANSLATE_NOOP("QObject", "File system:")</nobr>
                        </span>
                    </td>
                    <td width="100%">
                        <p>
                            <nobr>QT_TRANSLATE_NOOP("QObject", "Paragon backup capsule")</nobr>
                        </p>
                    </td>
                </tr>

                <tr>
                    <td>
                        <span style="color: #7c7d7d;">
                        <nobr><xsl:value-of select="PropertyList/Property[@propname='HdmCommonProperties::ShortSizeText']"/></nobr>
                        </span>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="PropertyBag/Property[@name='HdmCommonProperties::ShortSizeText']"/></nobr>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="PropertyBag/Property[@name='HdmCommonProperties::LongSizeText']"/></nobr>
                    </td>
                </tr>

                <tr>
                    <td>
                        <span style="color: #7c7d7d;">
                        <nobr><xsl:value-of select="PropertyList/Property[@propname='PartitionProperties::ShortDataSizeText']"/></nobr>
                        </span>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="concat(PropertyBag/Property[@name='PartitionProperties::ShortDataSizeText'],' (',PropertyBag/Property[@name='PartitionProperties::UsedSpacePercent'],'%)')"/></nobr>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="PropertyBag/Property[@name='PartitionProperties::LongDataSizeText']"/></nobr>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="PropertyBag/Property[@name='PartitionProperties::DataSizeInSectorsText']"/></nobr>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="color: #7c7d7d;">
                        <nobr><xsl:value-of select="PropertyList/Property[@propname='PartitionProperties::ShortFreeSizeText']"/></nobr>
                        </span>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="concat(PropertyBag/Property[@name='PartitionProperties::ShortFreeSizeText'],' (',PropertyBag/Property[@name='PartitionProperties::FreeSpacePercent'],'%)')"/></nobr>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="PropertyBag/Property[@name='PartitionProperties::LongFreeSizeText']"/></nobr>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="color: #7c7d7d;">
                        <nobr><xsl:value-of select="PropertyBag/Property[@propname='PartitionProperties::IsBootableBC']"/></nobr>
                        </span>
                    </td>
                    <td>
                        <nobr><xsl:value-of select="PropertyBag/Property[@name='PartitionProperties::IsBootableBC']"/></nobr>
                    </td>
                </tr>
            </table>
        </body>
    </html>

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


