I have some XML that has 1 sales order and in that sales order is 3 sales order lines. The output I am after is a table such as

```
|Line No | Description | Qty 
-----------------------------
|     1  | Product A   | 5
|     2  | Product B   | 10
|     3  | Product C   ! 7
-----------------------------

```

However what I achieve is 

```
|Line No | Description | Qty 
-----------------------------
|     1  | Product A   | 5
|     1  | Product A   | 5
|     1  | Product A   | 5
-----------------------------

```

I include my XML input and my XSL in full (sorry if I have supplied too much text)

Can any one spot my error or advise a way forward?

xml Input 

```
<?xml version="1.0" encoding="UTF-8"?>
<SOQrySurcharge>
    <SalesOrders Language="05" Language2="EN" CssStyle="" DecFormat="1" DateFormat="01" Role="01" Version="6.1.083" OperatorPrimaryRole="   ">
    <Order>
      <CustomerPoNumber>7000654438</CustomerPoNumber>
      <SalesOrder>003411</SalesOrder>

    </Order>
  </SalesOrders>
  <SorDetail Language="05" Language2="EN" CssStyle="" DecFormat="1" DateFormat="01" Role="01" Version="6.1.025" OperatorPrimaryRole="   " xmlns:SALARE="SALARE" xmlns:SALSLS="SALSLS" xmlns:TBLART="TBLART" xmlns:SALBRN="SALBRN" xmlns:TBLCUR="TBLCUR">
    <SalesOrder>003411</SalesOrder>
    <CustomerName>Siemens</CustomerName>

    <HeaderText>
    </HeaderText>
    <SalesOrderLine>
      <Merchandise>
        <SalesOrderLine>   1</SalesOrderLine>
        <MStockCode>11</MStockCode>
        <MStockDes>Low Temp SG Surcharge</MStockDes>
        <MShipQty>       4.100</MShipQty>
        <MPrice>        121.72000</MPrice>
        <OrderLineValue>          499.05</OrderLineValue>

      </Merchandise>
    </SalesOrderLine>
    <SalesOrderLine>
      <Merchandise>
        <SalesOrderLine>   2</SalesOrderLine>
        <MStockCode>1</MStockCode>
        <MStockDes>Grey Iron Surcharge</MStockDes>
        <MShipQty>       0.264</MShipQty>
        <MPrice>        137.63000</MPrice>
        <OrderLineValue>           36.33</OrderLineValue>

      </Merchandise>
    </SalesOrderLine>
    <SalesOrderLine>
      <Merchandise>
        <SalesOrderLine>   3</SalesOrderLine>
       <MStockCode>13</MStockCode>
        <MStockDes>Ferritic SG + Mo Surcharge</MStockDes>
       <MShipQty>      15.155</MShipQty>
        <MPrice>        155.07000</MPrice>

      </Merchandise>
    </SalesOrderLine>
  </SorDetail>
</SOQrySurcharge>

```

xsl Script

```
    <?xml version="1.0" encoding="Windows-1252" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" omit-xml-declaration="yes" />
    <xsl:template match="/">
        <html>
            <head>
                <title>Mestect Usage E-mail</title>
                <style>
            body {
            }

            h1 {
                text-align: left;
                color: #221076;
                font-size: 40px;
                font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
                font-weight: bold;
            }

            .def-container {
                 border: 2px solid black;
                margin: 0 0 3px 0;
                width: 70%;
                background-color: #FFA500;
            }

            .heading {
                display: inline;
                color: black;
                font-size: medium;
                font-family: Verdana, sans-serif;
                font-weight: bold;
            }

            .headingvalue {
                display: inline;
                color: black;
                font-size: medium;
                font-family: Verdana, sans-serif;
            }

                </style>
            </head>
            <body>
            <p> The following orders have been created by dataswitch in Syspro Company R</p>
                <h1>Auto created Material Surcharges</h1>
                <div class="def-container">
                    <div class="heading">Customer Purchase Order: </div>
                    <div class="headingvalue">
                        <xsl:value-of select="//CustomerPoNumber" />
                    </div>
                    <div class="heading">Customer: </div>
                    <div class="headingvalue">
                        <xsl:value-of select="//CustomerName" />
                    </div>
                    <div class="heading">Syspro Order: </div>
                    <div class="headingvalue">
                        <xsl:value-of select="//SalesOrder" />
                    </div>
                    <table border="1">
                    <tr>

                        <th>Surcharge Type</th>
                        <th>Surcharge Amount</th>
                        <th>Tonnes</th>
                        <th>Line Value</th>

                    </tr>

                     <xsl:for-each select="//Merchandise">

                        <tr>
                            <td>
                                <xsl:value-of select="//MStockDes" />
                            </td>
                            <td>
                                <xsl:value-of select="//MPrice" />
                            </td>
                            <td>
                                <xsl:value-of select="//MShipQty" />
                            </td>
                            <td>
                                <xsl:value-of select="//OrderLineValue" />
                            </td>
                        </tr>
                        </xsl:for-each>

                    </table>
                </div>

            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>

```

Finally, the transform result

```
<html>
  <head>
    <title>Mestect Usage E-mail</title>
    <style>
            body {
            }

            h1 {
                text-align: left;
                color: #221076;
                font-size: 40px;
                font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
                font-weight: bold;
            }

            .def-container {
                 border: 2px solid black;
                margin: 0 0 3px 0;
                width: 70%;
                background-color: #FFA500;
            }

            .heading {
                display: inline;
                color: black;
                font-size: medium;
                font-family: Verdana, sans-serif;
                font-weight: bold;
            }

            .headingvalue {
                display: inline;
                color: black;
                font-size: medium;
                font-family: Verdana, sans-serif;
            }

                </style>
  </head>
  <body>
    <p> The following orders have been created by dataswitch in Syspro Company R</p>
    <h1>Auto created Material Surcharges</h1>
    <div class="def-container">
      <div class="heading">Customer Purchase Order: </div>
      <div class="headingvalue">7000654438</div>
      <div class="heading">Customer: </div>
      <div class="headingvalue">Siemens</div>
      <div class="heading">Syspro Order: </div>
      <div class="headingvalue">003411</div>
      <table border="1">
        <tr>
          <th>Surcharge Type</th>
          <th>Surcharge Amount</th>
          <th>Tonnes</th>
          <th>Line Value</th>
        </tr>
        <tr>
          <td>Low Temp SG Surcharge</td>
          <td>        121.72000</td>
          <td>       4.100</td>
          <td>          499.05</td>
        </tr>
        <tr>
          <td>Low Temp SG Surcharge</td>
          <td>        121.72000</td>
          <td>       4.100</td>
          <td>          499.05</td>
        </tr>
        <tr>
          <td>Low Temp SG Surcharge</td>
          <td>        121.72000</td>
          <td>       4.100</td>
          <td>          499.05</td>
        </tr>
      </table>
    </div>
  </body>
</html>

```