hi, im using the following code to put data in to a simple table. The first 2 elements go into the table fine but the 3rd part of the table displays all the data for that row combind. any ideas? thanks for the help.
kenny
xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="<xsl:template match="/">
<html>
<head>
<title> CD Collection </title>
</head>
<body>
<table border = "2" bgcolor = "red">
<tr>
<th> Artist </th>
<th> Title </th>
<th> Genre </th>
</tr>
<xsl:for-each select="cdCollection/cd">
<tr>
<td><xsl:value-of select="artist"/></td>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of Select="genre"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="cdstyle.xsl" ?>
<cdCollection>
<cd>
<artist> Jurassic 5 </artist>
<title> Concrete Schoolyard </title>
<genre> Hip Hop </genre>
</cd>
<cd>
<artist> Dr Dre </artist>
<title> The Chronic </title>
<genre> Hip Hop </genre>
</cd>
<cd>
<artist> The Doors </artist>
<title> L.A. Woman </title>
<genre> Blues </genre>
</cd>
<cd>
<artist> Nirvana </artist>
<title> Bleach </title>
<genre> Grunge </genre>
</cd>
</cdCollection>
kenny
xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="<xsl:template match="/">
<html>
<head>
<title> CD Collection </title>
</head>
<body>
<table border = "2" bgcolor = "red">
<tr>
<th> Artist </th>
<th> Title </th>
<th> Genre </th>
</tr>
<xsl:for-each select="cdCollection/cd">
<tr>
<td><xsl:value-of select="artist"/></td>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of Select="genre"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="cdstyle.xsl" ?>
<cdCollection>
<cd>
<artist> Jurassic 5 </artist>
<title> Concrete Schoolyard </title>
<genre> Hip Hop </genre>
</cd>
<cd>
<artist> Dr Dre </artist>
<title> The Chronic </title>
<genre> Hip Hop </genre>
</cd>
<cd>
<artist> The Doors </artist>
<title> L.A. Woman </title>
<genre> Blues </genre>
</cd>
<cd>
<artist> Nirvana </artist>
<title> Bleach </title>
<genre> Grunge </genre>
</cd>
</cdCollection>