title: Can name() method be used in if tag
body: <p>If the if condition is commented i get output as w:p, w:sec etc, which is exactly what i need. But with the if condition where only w:p should be allowed to print is not happening. Can any figure this out...</p>
  
  <pre><code>&lt;xsl:param name="para" select="w:p"/&gt;
  
   &lt;xsl:template match="/"&gt;
  
           &lt;xsl:for-each select="node()/*/*"&gt;
              &lt;xsl:if test = "name() = $para"&gt;
                  &lt;xsl:value-of select="name()"/&gt;&lt;xsl:text&gt;
      &lt;/xsl:text&gt;
              &lt;/xsl:if&gt;
           &lt;/xsl:for-each&gt;
  
      &lt;/xsl:template&gt;
  </code></pre>
  
  <p><strong>Input XML:</strong></p>
  
  <pre><code>&lt;w:p&gt;
  &lt;w:pPr&gt;&lt;/w:pPr&gt;
  &lt;/w:p&gt;
  &lt;w:sec&gt;
  &lt;/w:sec&gt;
  </code></pre>