title: XML/XSLT - xsl:key concat
body: <p>I have the following <strong>XML</strong> code:</p>
  
  <pre><code>&lt;training_center&gt;
  &lt;course id="XML"&gt;
      &lt;title&gt;Course 1&lt;/title&gt;
      &lt;keywords&gt;
          &lt;keyword&gt;XML&lt;/keyword&gt;
          &lt;keyword&gt;XPath&lt;/keyword&gt;
      &lt;/keywords&gt;
      &lt;teachers&gt;
          &lt;teacher&gt;Nikitin&lt;/teacher&gt;
          &lt;teacher&gt;Pavlov&lt;/teacher&gt;
      &lt;/teachers&gt;
  &lt;/course&gt;
  &lt;course id="AJAX"&gt;
      &lt;title&gt;Course 2&lt;/title&gt;
      &lt;keywords&gt;
          &lt;keyword&gt;AJAX&lt;/keyword&gt;
          &lt;keyword&gt;XML&lt;/keyword&gt;
      &lt;/keywords&gt;
      &lt;teachers&gt;
          &lt;teacher&gt;Nikitin&lt;/teacher&gt;
          &lt;teacher&gt;Chebykin&lt;/teacher&gt;
      &lt;/teachers&gt;
  &lt;/course&gt;
  &lt;/training_center&gt;
  </code></pre>
  
  <p>And the following <strong>XSL</strong> code:</p>
  
  <pre><code>&lt;xsl:key 
      name='concat_key'
      match="/training_center/course"
      use="concat(teachers/teacher, ':', keywords/keyword)"
  /&gt;
  &lt;xsl:template match="/"&gt;                
      &lt;xsl:apply-templates select="key('concat_key', concat('Nikitin',':','XML'))" /&gt;
  &lt;/xsl:template&gt;
  &lt;xsl:template match="course"&gt;
      &lt;xsl:element name="course"&gt;         
          &lt;xsl:value-of select="./title" /&gt;
      &lt;/xsl:element&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>After <strong>XSL-transformation</strong> <em>Course 1</em> is shown only. But logically <em>Course 2</em> shall be shown also. <br>In what error?</p>