title: XSLT 1.0 select value-of in node set with string
body: <p>I have some trouble with selecting values in node set. I have a string variable,
  which concatenate in path of next existed node in xml. But when i try to select valu from it,
  it results in paste of value of this variable, not the value of node. I can`t find how i can
  convert string to node set for proper selection. Please, help.</p>
  
  <pre><code>&lt;xsl:for-each select="result/node()"&gt;
      &lt;xsl:copy&gt;
          &lt;xsl:for-each select="./node()"&gt;
              &lt;xsl:copy&gt;
                  &lt;xsl:attribute name="rating"&gt;
                      &lt;xsl:text&gt;0&lt;/xsl:text&gt;
                  &lt;/xsl:attribute&gt;
                  &lt;xsl:choose&gt;
                      &lt;xsl:when test="translate(
                                         substring(.,1,3),
                                         $upCase,
                                         $lowCase
                                      ) = 'id_'"&gt;
                          &lt;xsl:value-of  select="."/&gt;
                      &lt;/xsl:when&gt;
                      &lt;xsl:otherwise&gt;
                          &lt;xsl:variable name="cval"
                                        select="concat(
                                                   '/survey/checkbox_value/',
                                                   local-name(),
                                                   '/.'
                                                )" /&gt;
                          &lt;xsl:value-of select="$cval" /&gt;
                      &lt;/xsl:otherwise&gt;
                  &lt;/xsl:choose&gt;
              &lt;/xsl:copy&gt;
          &lt;/xsl:for-each&gt;
      &lt;/xsl:copy&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>