title: XML transform copy one element twice in different section
body: <p><br>
  I have a XML which needs some transformation to be properly imported to our database. I made most of the changes but I have a problem with duplicating of one element (E100customerKey in ApprovedCountry tag). No idea how can I duplicate it in this part of file. Please see code below:</p>
  
  <p>Sample code received from partner:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;CustomerList&gt;
      &lt;TransferHeader&gt;
          &lt;Apllication&gt;ApllicationForTransferCustomer&lt;/Apllication&gt;
          &lt;Sender&gt;Partenr&lt;/Sender&gt;
          &lt;MailAdr&gt;mail@mail.pl&lt;/MailAdr&gt;
          &lt;GeneratedDate&gt;20160114&lt;/GeneratedDate&gt;
          &lt;NumberOfCustomers&gt;3&lt;/NumberOfCustomers&gt;
      &lt;/TransferHeader&gt;
      &lt;CustomerList&gt;
          &lt;Customer&gt;
              &lt;E100customerKey&gt;03-98&lt;/E100customerKey&gt;
              &lt;VATNumber&gt;2222222222&lt;/VATNumber&gt;
              &lt;EUVATNumber&gt;11111111111&lt;/EUVATNumber&gt;
              &lt;CustomerName1&gt;CustomerName&lt;/CustomerName1&gt;
              &lt;LineOfBusiness&gt;uslugi transportowe&lt;/LineOfBusiness&gt;
              &lt;NACEcode&gt;4941&lt;/NACEcode&gt;
              &lt;RequiredForPrivateCompany/&gt;
              &lt;ApprovedCountriesList&gt;
                  &lt;ApprovedCountry&gt;
                      &lt;CountryCode&gt;ES&lt;/CountryCode&gt;
                      &lt;ServiceType&gt;Normal&lt;/ServiceType&gt;
                      &lt;PartnerPercent&gt;3&lt;/PartnerPercent&gt;
                  &lt;/ApprovedCountry&gt;
              &lt;/ApprovedCountriesList&gt;
          &lt;/Customer&gt;
      &lt;/CustomerList&gt;
  &lt;/CustomerList&gt;
  </code></pre>
  
  <p>Needed code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;CustomerList&gt;
      &lt;CustomerList&gt;
          &lt;Customer&gt;
              &lt;E100customerKey&gt;03-98&lt;/E100customerKey&gt;
              &lt;VATNumber&gt;2222222222&lt;/VATNumber&gt;
              &lt;EUVATNumber&gt;11111111111&lt;/EUVATNumber&gt;
              &lt;CustomerName1&gt;CustomerName&lt;/CustomerName1&gt;
              &lt;LineOfBusiness&gt;uslugi transportowe&lt;/LineOfBusiness&gt;
              &lt;NACEcode&gt;4941&lt;/NACEcode&gt;
              &lt;ApprovedCountriesList&gt;
                  &lt;ApprovedCountry&gt;
                      &lt;E100customerKey&gt;03-98&lt;/E100customerKey&gt;
                      &lt;CountryCode&gt;ES&lt;/CountryCode&gt;
                      &lt;ServiceType&gt;Normal&lt;/ServiceType&gt;
                      &lt;PartnerPercent&gt;3&lt;/PartnerPercent&gt;
                  &lt;/ApprovedCountry&gt;
              &lt;/ApprovedCountriesList&gt;
          &lt;/Customer&gt;
      &lt;/CustomerList&gt;
  &lt;/CustomerList&gt;
  </code></pre>
  
  <p>My XSL file so far:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
   &lt;xsl:output omit-xml-declaration="yes" indent="yes" encoding="UTF-8" /&gt;
  
   &lt;xsl:template match="node()|@*"&gt;
    &lt;xsl:copy&gt;
     &lt;xsl:apply-templates select="node()|@*"/&gt;
    &lt;/xsl:copy&gt;
   &lt;/xsl:template&gt;
  
  &lt;!-- Probably needs to fix this part --&gt;
   &lt;xsl:template match="CustomerList/CustomerList/Customer/ApprovedCountriesList/ApprovedCountry"&gt;
    &lt;/xsl:template&gt;
  
   &lt;xsl:template match="CustomerList/TransferHeader|RequiredForPrivateCompany"/&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>