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