title: when replace the xml elements with the help of xsl stylesheet using java,not getting replaced
body: <p>how to replace the child tag name with xsl.
  here the below is my structure of  xml.</p>
  
  <pre><code>  &lt;Checkpax xmlns="http://xml.api.com/test"&gt;
      &lt;customerLevel&gt;
          &lt;customerDetails&gt;
              &lt;paxDetails&gt;
                  &lt;surname&gt;MUKHERJEE&lt;/surname&gt;
                  &lt;type&gt;A&lt;/type&gt;
                  &lt;gender&gt;M&lt;/gender&gt;
              &lt;/paxDetails&gt;
              &lt;otherPaxDetails&gt;
                  &lt;givenName&gt;JOY&lt;/givenName&gt;
                  &lt;title&gt;MR&lt;/title&gt;
                  &lt;age&gt;11&lt;/age&gt;
              &lt;/otherPaxDetails&gt;
              &lt;otherPaxDetails&gt;
                  &lt;title&gt;MR&lt;/title&gt;
              &lt;/otherPaxDetails&gt;
          &lt;/customerDetails&gt;
          &lt;staffDetails&gt;
              &lt;staffInfo/&gt;
              &lt;staffCategoryInfo&gt;
                  &lt;attributeDetails&gt;
                      &lt;attributeType&gt;NA&lt;/attributeType&gt;
                  &lt;/attributeDetails&gt;
              &lt;/staffCategoryInfo&gt;
          &lt;/staffDetails&gt;
          &lt;productLevel&gt;
              &lt;legLevel&gt;
                  &lt;legLevelIndicator&gt;
                      &lt;statusDetails&gt;
                          &lt;indicator&gt;abc&lt;/indicator&gt;
                          &lt;action&gt;1&lt;/action&gt;
                      &lt;/statusDetails&gt;
                  &lt;/legLevelIndicator&gt;
              &lt;/legLevel&gt;
          &lt;/productLevel&gt;
          &lt;CustomerLevel&gt;
              &lt;legLevel&gt;
                  &lt;legLevelIndicator&gt;
                      &lt;statusDetails&gt;
                          &lt;indicator&gt;cde&lt;/indicator&gt;
                          &lt;action&gt;1&lt;/action&gt;
                      &lt;/statusDetails&gt;
                  &lt;/legLevelIndicator&gt;
              &lt;/legLevel&gt;
          &lt;/CustomerLevel&gt;
      &lt;/customerLevel&gt;
  &lt;/Checkpax&gt;
  </code></pre>
  
  <p>The below is my XSL file</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt;
      &lt;xsl:output method="xml" omit-xml-declaration="yes"/&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;xsl:template match="customerLevel/productLevel/legLevel/legLevelIndicator/statusDetails"&gt;
          &lt;statusInformation&gt;
              &lt;xsl:apply-templates select="@*|node()" /&gt;
          &lt;/statusInformation&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>here the statusDetails name should be changed as staffInformation inside the ProductLevel/LeglevelIndicator . Kindly give me the suggestion for doing this.</p>
  
  <p>The below is expected result</p>
  
  <pre><code>&lt;Checkpax xmlns="http://xml.api.com/test"&gt;
          &lt;customerLevel&gt;
              &lt;customerDetails&gt;
                  &lt;paxDetails&gt;
                      &lt;surname&gt;MUKHERJEE&lt;/surname&gt;
                      &lt;type&gt;A&lt;/type&gt;
                      &lt;gender&gt;M&lt;/gender&gt;
                  &lt;/paxDetails&gt;
                  &lt;otherPaxDetails&gt;
                      &lt;givenName&gt;JOY&lt;/givenName&gt;
                      &lt;title&gt;MR&lt;/title&gt;
                      &lt;age&gt;11&lt;/age&gt;
                  &lt;/otherPaxDetails&gt;
                  &lt;otherPaxDetails&gt;
                      &lt;title&gt;MR&lt;/title&gt;
                  &lt;/otherPaxDetails&gt;
              &lt;/customerDetails&gt;
              &lt;staffDetails&gt;
                  &lt;staffInfo/&gt;
                  &lt;staffCategoryInfo&gt;
                      &lt;attributeDetails&gt;
                          &lt;attributeType&gt;NA&lt;/attributeType&gt;
                      &lt;/attributeDetails&gt;
                  &lt;/staffCategoryInfo&gt;
              &lt;/staffDetails&gt;
              &lt;productLevel&gt;
                  &lt;legLevel&gt;
                      &lt;legLevelIndicator&gt;
                          &lt;statusInformation&gt;
                              &lt;indicator&gt;abc&lt;/indicator&gt;
                              &lt;action&gt;1&lt;/action&gt;
                          &lt;/statusInformation&gt;
                      &lt;/legLevelIndicator&gt;
                  &lt;/legLevel&gt;
              &lt;/productLevel&gt;
              &lt;CustomerLevel&gt;
                  &lt;legLevel&gt;
                      &lt;legLevelIndicator&gt;
                          &lt;statusDetails&gt;
                              &lt;indicator&gt;cde&lt;/indicator&gt;
                              &lt;action&gt;1&lt;/action&gt;
                          &lt;/statusDetails&gt;
                      &lt;/legLevelIndicator&gt;
                  &lt;/legLevel&gt;
              &lt;/CustomerLevel&gt;
          &lt;/customerLevel&gt;
      &lt;/Checkpax&gt;
  </code></pre>