Transforming xml with namespaces using XSLT
<p>I have the following xml </p>

<pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;typeNames xmlns="http://www.dsttechnologies.com/awd/rest/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
   &lt;typeName recordType="case" href="awdServer/awd/services/v1/businessareas/SAMPLEBA/types/SAMPLECASE"&gt;SAMPLECASE&lt;/typeName&gt;
   &lt;typeName recordType="folder" href="awdServer/awd/services/v1/businessareas/SAMPLEBA/types/SAMPLEFLD"&gt;SAMPLEFLD&lt;/typeName&gt;
   &lt;typeName recordType="source" href="awdServer/awd/services/v1/businessareas/SAMPLEBA/types/SAMPLEST"&gt;SAMPLEST&lt;/typeName&gt;
   &lt;typeName recordType="transaction" href="awdServer/awd/services/v1/businessareas/SAMPLEBA/types/SAMPLEWT"&gt;SAMPLEWT&lt;/typeName&gt;
&lt;/typeNames&gt;
</code></pre>

<p>I want to transform above xml as below by using XSLT:</p>

<pre><code> &lt;response&gt;
         &lt;results&gt;

               &lt;source&gt;
                  SAMPLEST
               &lt;/source&gt;

         &lt;/results&gt;
      &lt;/response&gt;
   &lt;/xsl:template&gt;
</code></pre>

<p>I just want to get the source from the input xml to the output xml.</p>

<p>I am trying with the following xml, but couldn't get the required output xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:v="http://www.dsttechnologies.com/awd/rest/v1" version="2.0" exclude-result-prefixes="v"&gt;
   &lt;xsl:output method="xml" version="1.0" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" /&gt;
   &lt;xsl:strip-space elements="*" /&gt;
   &lt;!-- identity transform --&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="typeNames"&gt;
      &lt;response&gt;
         &lt;results&gt;

               &lt;source&gt;
                  &lt;xsl:value-of select="source" /&gt;
               &lt;/source&gt;

         &lt;/results&gt;
      &lt;/response&gt;
   &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
</code></pre>