title: XQuery variable in return expression not resolving its value
body: <p>I am trying to run XQuery code, but variable in return expression is not being resolved</p>
  
  <p>When I run the following XQuery code</p>
  
  <pre><code>for $x in (&lt;Person/&gt;,&lt;Person/&gt;)
  return $x
  </code></pre>
  
  <p>I get the output</p>
  
  <pre><code>&lt;Person/&gt;
  &lt;Person/&gt;
  </code></pre>
  
  <p>Which is fine, but when I run the following code</p>
  
  <pre><code>for $x in (&lt;Person/&gt;,&lt;Person/&gt;)
  return &lt;Name&gt;$x&lt;/Name&gt;
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Name&gt;$x&lt;/Name&gt;
  &lt;Name&gt;$x&lt;/Name&gt;
  </code></pre>
  
  <p>Why is the variable $x not resolved when enclosed inside an element in a return expression?</p>