title: Get tag name/attribute name in XML using XSLT
body: <p>What's the way to get a tag name and attribute name in XML?</p>
  
  <p>If I have a XML file like this:</p>
  
  <pre><code>&lt;a&gt;
  &lt;apple color="red"/&gt;
  &lt;banana color="yellow"/&gt;
  &lt;sugar taste="sweet"/&gt;
  &lt;cat size="small"/&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>And part of my XSLT file is as below:</p>
  
  <pre><code>&lt;xsl:element name="AAA"&gt;
  &lt;???&gt;
  &lt;/xsl:element&gt;
  </code></pre>
  
  <p>So what should I write in the <code>???</code> part so I can get the output like this:</p>
  
  <p>For tag name:</p>
  
  <pre><code>&lt;AAA&gt;apple&lt;/AAA&gt;
  &lt;AAA&gt;banana&lt;/AAA&gt;
  &lt;AAA&gt;sugar&lt;/AAA&gt;
  &lt;AAA&gt;cat&lt;/AAA&gt;
  </code></pre>
  
  <p>For attribute name:</p>
  
  <pre><code>&lt;AAA&gt;color&lt;/AAA&gt;
  &lt;AAA&gt;color&lt;/AAA&gt;
  &lt;AAA&gt;taste&lt;/AAA&gt;
  &lt;AAA&gt;size&lt;/AAA&gt;
  </code></pre>