title: Create global variable in XSL from specific tag in XML
body: <p>I'm having trouble creating a global variable in my XSL 1.0 stylesheet.  I want to create the variable from the value of an XML tag that is in the XML I'm trying to transform.  Here is what my XML looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  
  &lt;config name="test report" xmlns="http://www.example.com/CONFIG"&gt;
  
      &lt;the_one_i_want&gt;1000&lt;/the_one_i_want&gt;
  
      &lt;!-- lots of other stuff --&gt;
  
  &lt;/config&gt;
  </code></pre>
  
  <p>And here is what my XSL looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:CONFIG="http://www.example.com/CONFIG"&gt;
  
      &lt;xsl:output method="html"/&gt;
  
      &lt;xsl:variable name="normal_global_variable"&gt;100&lt;/xsl:variable&gt;&lt;!-- This works fine --&gt;
      &lt;xsl:variable name="variable_from_xml"&gt;&lt;xsl:value-of select="/config/the_one_i_want/value"/&gt;&lt;/xsl:variable&gt;&lt;!-- This does not work --&gt;
  
      &lt;!-- lots of other stuff --&gt;
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>So I would expect that <code>variable_from_xml</code> would have a value of <code>1000</code>, but it does not.  What am I doing wrong?</p>
  
  <p><strong>P.S.</strong> The XML tag named <code>the_one_i_want</code> is unique and only appears once in my XML.</p>