Creating HTML tag using XSLT <p>I have an XML (Here I have shown only a fragment and it has several Control elements,</p> <pre><code> &lt;Control Name="submit" ID=""&gt; &lt;Properties&gt; &lt;Property Name="id" Value="btn_Submit" /&gt; &lt;Property Name="value" Value="Submit" /&gt; &lt;/Properties&gt; &lt;/Control&gt; </code></pre> <p>and I want to get html as</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;example_htmlPage&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;input id="btn_Submit" type="submit" value="Submit"/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>by using XSLT. I have written an XSLT as</p> <pre><code> &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:template match="/"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;example_htmlPage&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;xsl:apply-templates/&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;xsl:template match="/"&gt; &lt;xsl:for-each select="//Control[@Name='submit']"&gt; &lt;input type="submit" value="//Property/@Value/text()"/&gt; &lt;/xsl:for-each&gt; &lt;xsl:apply-templates/&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>So, my question is how to get the value of an attribute into HTML tag? I couldnt solve it by creating local variable as well as by using </p> <pre><code> &lt;input type="submit" value=&amp;lt;xsl:select="(//Property/@Value/text())"/&amp;gt;/&gt; </code></pre> <p>Please help me.</p>