title: xpath xsl concat
body: <p>given the following</p>
  
  <pre><code>&lt;ZIP0&gt;10015&lt;/ZIP0&gt;
  &lt;ZIP1&gt;10016&lt;/ZIP1&gt;
  ...
  &lt;ZIP99&gt;10016&lt;/ZIP99&gt;
  </code></pre>
  
  <p>im using xpath concat() in order to combine the element name and integer:</p>
  
  <pre><code>&lt;ZIP&gt;&lt;xsl:value-of select="concat('ZIP','0')"/&gt;&lt;/ZIP&gt;
  </code></pre>
  
  <p>concat returns the literal string...</p>
  
  <pre><code>&lt;ZIP&gt;ZIP0&lt;/ZIP&gt;
  </code></pre>
  
  <p>of course, what is intented is,</p>
  
  <pre><code>&lt;ZIP&gt;10015&lt;/ZIP&gt;
  </code></pre>
  
  <p>how to evaluate the string expression returned from concat.</p>
  
  <p>and this also offers the same result:</p>
  
  <pre><code>&lt;xsl:variable name="tmp" select="concat('ZIP','0')"/&gt;
  &lt;ZIP&gt;&lt;xsl:value-of select="$tmp"/&gt;&lt;/ZIP&gt;
  </code></pre>
  
  <p>in fact, its evaluated like,</p>
  
  <pre><code>&lt;xsl:value-of select="'ZIP0'"/&gt;
  </code></pre>
  
  <p>opposed to </p>
  
  <pre><code>&lt;xsl:value-of select="ZIP0"/&gt;
  </code></pre>
  
  <p>cheers</p>