title: Display value of variable in xslt
body: <p>Hi I want to populate the value of maxbars variable in the width in the percentage format, but for some reasons its not taking its value. Can you please help.</p>
  
  <p>Example: I want to display it as width:10.9% format  </p>
  
  <pre><code>&lt;xsl:for-each select="catalog/cd/price"&gt;
   Current node:
   &lt;xsl:variable name="maxbars" select="."/&gt;
   &lt;div style="width: 200px; height: 20px;"&gt;
   &lt;div style="width: maxbars%; height: 18px; background-color: red"&gt;&lt;/div&gt;
   &lt;/div&gt;
   &lt;br/&gt;
   &lt;/xsl:for-each&gt;
  
  
  
  &lt;catalog&gt;
  &lt;cd&gt;
      &lt;title&gt;Empire Burlesque&lt;/title&gt;
      &lt;artist&gt;Bob Dylan&lt;/artist&gt;
      &lt;country&gt;USA&lt;/country&gt;
      &lt;company&gt;Columbia&lt;/company&gt;
      &lt;price&gt;10.90&lt;/price&gt;
      &lt;year&gt;1985&lt;/year&gt;
  &lt;/cd&gt;
  &lt;cd&gt;
      &lt;title&gt;Hide your heart&lt;/title&gt;
      &lt;artist&gt;Bonnie Tyler&lt;/artist&gt;
      &lt;country&gt;UK&lt;/country&gt;
      &lt;company&gt;CBS Records&lt;/company&gt;
      &lt;price&gt;9.90&lt;/price&gt;
      &lt;year&gt;1988&lt;/year&gt;
  &lt;/cd&gt;
  </code></pre>
  
  <p></p>