title: xslt and xpath: match two node attributes
body: <p>given the following xml:</p>
  
  <p></p>
  
  <pre><code>&lt;student studentID="001"&gt; 
      &lt;dateOfBirth&gt; 1-1-1990 &lt;/dateOfBirth&gt;
      &lt;name&gt; Ayse Ozer &lt;/name&gt;
      &lt;sex&gt; F &lt;/sex&gt;
      &lt;takes&gt; CMPE351 &lt;/takes&gt;
      &lt;takes&gt; CMPE111 &lt;/takes&gt;
  &lt;takes&gt; CMPE418 &lt;/takes&gt;
   &lt;/student&gt;
  
   &lt;student studentID="002"&gt; 
      &lt;dateOfBirth&gt; 2-2-1992 &lt;/dateOfBirth&gt;
      &lt;name&gt; Bircan Korkmaz &lt;/name&gt;
      &lt;sex&gt; F &lt;/sex&gt;
      &lt;takes&gt; CMPE418 &lt;/takes&gt;
      &lt;takes&gt; CMPE111 &lt;/takes&gt;
  &lt;takes&gt; CMPE352 &lt;/takes&gt;
      &lt;/student&gt;
  
  &lt;course courseCode="CMPE351"&gt;
       &lt;courseName&gt;
             Database systems I
       &lt;/courseName&gt;
       &lt;description&gt;
           First course in databases
       &lt;/description&gt;       
   &lt;/course&gt;
  
   &lt;course courseCode="CMPE111"&gt;
       &lt;courseName&gt;
             Introduction to C
       &lt;/courseName&gt;
       &lt;description&gt;
           First course in programming
       &lt;/description&gt;       
   &lt;/course&gt;
  
   &lt;course courseCode="CMPE352"&gt;
       &lt;courseName&gt;
             Database systems II
       &lt;/courseName&gt;
       &lt;description&gt;
           Second course in databases
       &lt;/description&gt;       
   &lt;/course&gt;
  
   &lt;course courseCode="CMPE418"&gt;
       &lt;courseName&gt;
             Internet Programming
       &lt;/courseName&gt;
       &lt;description&gt;
           Programming for the Internet.
       &lt;/description&gt;       
   &lt;/course&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want output like that</p>
  
  <p>Courses Taken By Students:</p>
  
  <pre><code>* Ayse Ozer
        o CMPE351 Database systems I
        o CMPE111 Introduction to C
  * Bircan Korkmaz
        o CMPE418 Internet Programming
        o CMPE111 Introduction to C
  </code></pre>
  
  <p>I wrote this xsl code:</p>
  
  <pre><code>&lt;xsl:template match = "school"&gt;
  &lt;head&gt;
  &lt;title&gt;Student&lt;/title&gt;    
   &lt;/head&gt;
   &lt;body&gt;
   &lt;p&gt;Courses Taken By Students:&lt;/p&gt;
     &lt;xsl:for-each select = "student"&gt;
   &lt;ul&gt;
   &lt;li&gt;&lt;xsl:value-of select = "name"/&gt; &lt;/li&gt;    
   &lt;xsl:for-each select = "takes"&gt;
   &lt;ul&gt;
   &lt;li&gt;&lt;xsl:value-of select="text()" /&gt;
  &lt;xsl:value-of select = "../../course[@courseCode=text()]/courseName"/&gt; &lt;/li&gt;
   &lt;/ul&gt; 
  &lt;/xsl:for-each&gt;
   &lt;/ul&gt;  
      &lt;/xsl:for-each&gt;
   &lt;/body&gt;
   &lt;/xsl:template&gt;
  </code></pre>
  
  <hr>
  
  <pre><code> &lt;xsl:value-of select = "../../course[@courseCode=text()]/courseName"/&gt;
   Problem about above line about text()
  </code></pre>