<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output
		  method="text"
		  version="4.0"
		  encoding="UTF-8"
		  omit-xml-declaration="yes"
                  indent="yes"
                  media-type="text"/>

	<xsl:template match="/Root/Report">
			<!-- Customer Information -->
			<xsl:apply-templates select="customerinfo"/>
                        <xsl:text>&#xa;</xsl:text>
			<!-- Report Information -->
			<xsl:apply-templates select="reportinfo"/>
                        <xsl:text>&#xa;</xsl:text>
			<!-- Hdd Info -->
                        <xsl:apply-templates select="sysinfo"/>
                        <xsl:text>&#xa;</xsl:text>
			<!-- General Info -->
                        <xsl:apply-templates select="wipeinfo"/>
                        <xsl:text>&#xa;</xsl:text>
			<!-- Hardware Info -->
			<xsl:apply-templates select="hardwareconfig"/>
                        <xsl:text>&#xa;</xsl:text>
			<!-- Bad Blocks Info -->
			<xsl:apply-templates select="badblocks"/>
                        <xsl:text>&#xa;</xsl:text>
			<!-- Report footer -->
            <xsl:apply-templates select="footer"/>
                        <xsl:text>&#xa;</xsl:text>
	</xsl:template>


	<xsl:template match="footer">

--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Hereby is confirmed that the wipe operation has been carried out according to instructions given by the software provider.")
        <xsl:text>&#xa;&#xa;&#xa;</xsl:text>
        QT_TRANSLATE_NOOP("QObject", "Wipe executive")                  QT_TRANSLATE_NOOP("QObject", "Supervisor")
	</xsl:template>

	<xsl:template match="customerinfo">

        QT_TRANSLATE_NOOP("QObject", "Data Sanitization Report")
--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Check the data erased according to the following requirements:")



        QT_TRANSLATE_NOOP("QObject", "Customer Information")
--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Person:")                         <xsl:value-of select="person"/>
        <xsl:choose>
            <xsl:when test='delltagmode'>
        QT_TRANSLATE_NOOP("QObject", "Service Tag:")                        <xsl:value-of select="company"/>
            </xsl:when>
            <xsl:otherwise>
        QT_TRANSLATE_NOOP("QObject", "Company:")                        <xsl:value-of select="company"/>
            </xsl:otherwise>
        </xsl:choose>
	</xsl:template>


	<xsl:template match="reportinfo">
        QT_TRANSLATE_NOOP("QObject", "Report Information")
--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Report Date:")                    <xsl:value-of select="reporttime"/>
        QT_TRANSLATE_NOOP("QObject", "Version:")                        <xsl:value-of select="version"/>

	</xsl:template>



    <xsl:template match="sysinfo">
        QT_TRANSLATE_NOOP("QObject", "System Information")
--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Computer name:")                  <xsl:value-of select="computer"/>
        QT_TRANSLATE_NOOP("QObject", "Operating system:")               <xsl:value-of select="system"/>
        QT_TRANSLATE_NOOP("QObject", "Os version:")                     <xsl:value-of select="win32"/>
        <xsl:if test="productkey != ''"> 
        QT_TRANSLATE_NOOP("QObject", "Product ID:")                     <xsl:value-of select="productkey"/>
        </xsl:if>
        QT_TRANSLATE_NOOP("QObject", "BIOS Version:")                   <xsl:value-of select="biosversion"/>
        QT_TRANSLATE_NOOP("QObject", "BIOS Date:")                      <xsl:value-of select="biosdate"/>

	</xsl:template>


        <xsl:template match="wipeinfo">
        QT_TRANSLATE_NOOP("QObject", "Wipe Information")
--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Object selected:")                <xsl:value-of select="name"/>
        QT_TRANSLATE_NOOP("QObject", "Start in sectors:")               <xsl:value-of select="partstart"/>
        QT_TRANSLATE_NOOP("QObject", "Size in sectors:")                <xsl:value-of select="partsize"/>
        QT_TRANSLATE_NOOP("QObject", "Drive:")                          <xsl:value-of select="driveinfo"/>
        <xsl:if test="serial != ''">
        QT_TRANSLATE_NOOP("QObject", "Serial number:")                  <xsl:value-of select="serial"/>
        </xsl:if>
        <xsl:if test="model != ''">
        QT_TRANSLATE_NOOP("QObject", "Model number:")                   <xsl:value-of select="model"/>
        </xsl:if>


        QT_TRANSLATE_NOOP("QObject", "Status:")                         <xsl:value-of select="status"/>
        QT_TRANSLATE_NOOP("QObject", "Operation:")                      <xsl:value-of select="wipeoperation"/>
        QT_TRANSLATE_NOOP("QObject", "Wipe method:")                    <xsl:value-of select="name"/>
        QT_TRANSLATE_NOOP("QObject", "Description:")                    <xsl:value-of select="description"/>
<xsl:variable name="WipeType" select="wipe_type"/>
<xsl:choose>
  <xsl:when test="$WipeType=1"> <!--WIPE_TYPE_OLD-->
    <xsl:for-each select="Algorithms/algorithm">
        <xsl:text>&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text>QT_TRANSLATE_NOOP("QObject", "Pass")<xsl:value-of select="position()"/>
        <xsl:text>&#x9;&#x9;&#x9;&#x9;</xsl:text>QT_TRANSLATE_NOOP("QObject", "Mask:") <xsl:value-of select="@mask"/><xsl:text>&#xa;</xsl:text>
        <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text>QT_TRANSLATE_NOOP("QObject", "Wiping passes:") <xsl:value-of select="@whipes"/><xsl:text>&#xa;</xsl:text>
    </xsl:for-each>
    <!--Bug 69613 - DCR Systems. Uplift qt_ui according to changes in WIPE structure -->
        &#xa;&#x9;&#x9;&#x9;&#x9;&#x9;QT_TRANSLATE_NOOP("QObject", "Repeat count:")                   <xsl:value-of select="whipes"/>
<!--        QT_TRANSLATE_NOOP("QObject", "Repeat count:")                   <xsl:value-of select="Algorithms/algorithm/@repeat"/>-->
  </xsl:when>
  <xsl:when test="$WipeType=0"> <!-- WIPE_TYPE_ADVANCED -->
        QT_TRANSLATE_NOOP("QObject", "Pass count:")                     <xsl:value-of select="whipes"/>
        QT_TRANSLATE_NOOP("QObject", "Verify count:")                   <xsl:value-of select="repeat"/>
  </xsl:when>
</xsl:choose>
        QT_TRANSLATE_NOOP("QObject", "Verify percent:")                 <xsl:value-of select="verifypercent"/>
        QT_TRANSLATE_NOOP("QObject", "Start time:")                     <xsl:value-of select="starttime"/>
        QT_TRANSLATE_NOOP("QObject", "End time:")                       <xsl:value-of select="finishtime"/>
        QT_TRANSLATE_NOOP("QObject", "Duration:")                       <xsl:value-of select="duration"/>
	</xsl:template>

	<xsl:template match="hardwareconfig">
        <xsl:variable name="WindowsPE" select="WindowsPE"/>
        QT_TRANSLATE_NOOP("QObject", "Hardware Information")
--------------------------------------------------------------------------------
        <xsl:if test="WindowsPE = ''">
        QT_TRANSLATE_NOOP("QObject", "Computer:")                       <xsl:value-of select="computer/item/description"/> <xsl:value-of select="computer/item/mfg"/>

        <xsl:for-each select="processors/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Processors:")                     <xsl:value-of select="description"/>    <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>
        </xsl:if>

        <xsl:for-each select="displayadapters/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Display adapters:")               <xsl:value-of select="description"/>    <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>

        <xsl:for-each select="monitors/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Monitors:")                       <xsl:value-of select="description"/>    <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/>      <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>

        <xsl:if test="WindowsPE = ''">
        <xsl:for-each select="floppydisk/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Floppy drives:")                  <xsl:value-of select="description"/>    <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>
        </xsl:if>

        <xsl:for-each select="diskdrives/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Disk drives:")                    <xsl:value-of select="description"/>    <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>

        <xsl:for-each select="dvdcdromdrives/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Optical drives:")                 <xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>

        <xsl:for-each select="net/item">
        <xsl:if test="mfg != 'Microsoft'">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Network adapters:")               <xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:if>
        </xsl:for-each>

        <xsl:for-each select="usb/item">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "USB Controllers:")                <xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
               </xsl:when>
               <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="description"/> <xsl:value-of select="general"/> <xsl:text>&#xa;</xsl:text>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="mfg"/> <xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>
        </xsl:for-each>


	</xsl:template>  <!-- Hardware Info -->


	<xsl:template match="badblocks">
        QT_TRANSLATE_NOOP("QObject", "Bad Block Info")
--------------------------------------------------------------------------------
        QT_TRANSLATE_NOOP("QObject", "Total Bad blocks:")                <xsl:value-of select="total"/>

        <xsl:for-each select="list/badblock">
                <xsl:choose>
                <xsl:when test="position() = 1">
        QT_TRANSLATE_NOOP("QObject", "Bad block list:")                 <xsl:value-of select="current()"/><xsl:text>&#xa;</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                <xsl:text>&#x9;&#x9;&#x9;&#x9;&#x9;</xsl:text><xsl:value-of select="current()"/><xsl:text>&#xa;</xsl:text>
                </xsl:otherwise>
                </xsl:choose>

        </xsl:for-each>


	</xsl:template>


</xsl:stylesheet>
